I wanted to check a previous commit.
I am in brach mybranch
where I had a few changes in a file, that's why I did git stash
first.
Then,
git checkout previouscommit
I ran the code, made a few changes that I don't want to save.
Now, how can I go back to mybranch
?
1) I don't want to keep the changes I made in previouscommit
.
2) I want to go back to mybranch
I know I have to do a git stash pop
but I am not sure at what point. Before, or after checking mybranch
? (Also I can't right now because I have done some changes as I said to a file that I don't want to keep and I am not sure how to force to go back to mybranch
.)