I checked out a new branch my_branch from master to create a new feature for my app, but I break another feature while doing it.
I don’t want to delete changes in my_branch but want to go back to master to see the original state of broken feature. Then, I want to go back to my_branch again.
How should I do this?
Thank you.
1) You can
git stashand go back to master see and come back andgit stash pop2) You can do
git show master:path/to/fileand see the file / directory ( this if you want to see the contents )3) You can always just commit, change branch and come back and
git reset HEAD~