I would like to undo my git pull on account of unwanted commits on the remote origin, but I don't know to which revision I have to reset back to.
How can I just go back to the state before I did the git pull on the remote origin?
gitpullundo
I would like to undo my git pull on account of unwanted commits on the remote origin, but I don't know to which revision I have to reset back to.
How can I just go back to the state before I did the git pull on the remote origin?
Best Answer
Or to make it more explicit than the other answer:
whoops?
Versions of git older than 1.7.1 do not have
--keep
. If you use such version, you could use--hard
- but that is a dangerous operation because it loses any local changes.To the commenter