if I made some changes, but didn't do a
commit -m "my message
, how can I rollback to where I was?if I did a
commit -m 'my message'
but didn't push to origin, how can I roll back?if I did a
git pull origin
, now I don't like what I got, how can I roll back to where I was?how can I get a list of what files are at the origin that have changed or are different from my local?
views:
33answers:
1
+2
A:
1) git reset --hard HEAD^
2) git reset --hard ORIG_HEAD
3) hit reset --hard <commit hash>
4)
git fetch
git diff origin/<branch>
references: http://www.kernel.org/pub/software/scm/git/docs/git-reset.html
Geoff Lanotte
2010-06-30 16:44:28
don't you have to fetch before you do the 4th one?
roe
2010-06-30 16:46:10
good call, updated.
Geoff Lanotte
2010-06-30 16:47:17