Hey I'm new to git and I need to undo a pull, can anyone help?!? So what I've done is...
this created a bunch of conflicts and went a bit wrong. Now doing 'git stash list' reveals that my stash is still there. Is it possible to revert my repo back to the point just after doing git commit. So effectively my repo only contains only changes I have made and nothing new from the server?
1 Answer. You can use the reflog to search out the first action before the rebase started then reset --hard back to that. e.g.
There is no command to explicitly undo the git pull command. The alternative is to use git reset, which reverts a repository back to a previous commit. We're working on a project called ck-git. A collaborator has just pushed a commit to the remote version of the project that is stored on GitHub.
Actually, to make this easier Git keeps a reference named ORIG_HEAD
that points where you were before the rebase. So, it's as easy as:
git reset --hard ORIG_HEAD
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With