On Thu, 8 Feb 2007, Kalle Pokki wrote:
I usually undo a pull by throwing away just the merge commit by
git reset --hard HEAD^
Don't do this.
If the merge just fast-forwarded, you'll do the wrong thing.
So yes, it _works_, but it only works if you actually ended up having a
real merge. In contrast, the ORIG_HEAD thing always works.
ORIG_HEAD is also particularly useful for doing things like "ok, what did
I get from that pull?" especially when you track somebody elses work (in
which case it will basically _always_ be a fast-forward). So I do
gitk ORIG_HEAD..
in git almost every time I pull from Junio's git thing, just because it's
a wonderful way to see what has changed, if you're interested in that kind
of detail.
Linus