Say I'm starting to work on a clear branch master- no changes to commit. Make some local changes, but understand that these changes should be separate branchinstead master.
Is there a way to move so that it changes to separate a new one branchand translate it masterinto status no changes to commit?
EDIT
According to the accepted answer on git branching - how to make the current master a branch and then revert the master back to the previous version? ... After completing the steps, my wizard will still have the modified files. See the last comment 7 .
Am I missing something?
$ git branch
nothing to commit, working directory clean
no changes added to commit (use "git add" and/or "git commit -a")
$ git stash
Saved working directory and index state WIP on master: 393bfad initial commit
HEAD is now at 393bfad initial commit
$ git status
nothing to commit, working directory clean
$ git checkout -b experiment
Switched to a new branch 'experiment'
$ git stash pop
no changes added to commit (use "git add" and/or "git commit -a")
Dropped refs/stash@{0} (16b6871d43f367edd03f59558eca4163cd1a2b2f)
$ git checkout master
M test.txt
Switched to branch 'master'
git status
user2107733