In svn or subclipse, I can simply do a ‘revert’ on the root project and all my local changes are discarded and src is updated to the latest in HEAD. I don’t seem to find an equivalent of this in git though several blogs claim the same.
This is what I did:
- committed 10 files from my home mac. did not push.
- committed the same 10 files and more from work computer and PUSHED.
- came back home and I want to take the latest from remote origin/master.
tried git pull, it brought in changes but warned of conflict
tried git reset --hard HEAD, but nothing happened. I still see the committed conflicted changes
I must’ve tried few other commands I don’t remember. I just need to get back to remote head and not worry about what state my local repo is.
Help?
You need to reset to origin/master: