tags:

views:

33

answers:

1
  1. if I made some changes, but didn't do a commit -m "my message, how can I rollback to where I was?

  2. if I did a commit -m 'my message' but didn't push to origin, how can I roll back?

  3. if I did a git pull origin , now I don't like what I got, how can I roll back to where I was?

  4. how can I get a list of what files are at the origin that have changed or are different from my local?

+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
don't you have to fetch before you do the 4th one?
roe
good call, updated.
Geoff Lanotte