Re: Git rescue mission

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Linus Torvalds <torvalds@...>
Cc: <git@...>, Bill Lear <rael@...>
Date: Thursday, February 8, 2007 - 4:12 pm

Linus Torvalds writes:

> For example, a command like "git pull" will leave a special magic name

I usually undo a pull by throwing away just the merge commit by

git reset --hard HEAD^

This seems to always get me back to the head commit I had previously, but I'm
wondering would git in some circumstances leave me with the commits I just pulled
and throw away my own work instead. Or is it guaranteed that I always reset
to the parent commit I had before the pull (i.e. ORIG_HEAD)?

Of course HEAD^ doesn't work the same with fast-forward merges, so it would
probably make more sense to just use ORIG_HEAD all the time.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Git rescue mission, Bill Lear, (Wed Feb 7, 8:18 pm)
Re: Git rescue mission, Linus Torvalds, (Thu Feb 8, 1:27 pm)
Re: Git rescue mission, Kalle Pokki, (Thu Feb 8, 4:12 pm)
Re: Git rescue mission, Linus Torvalds, (Thu Feb 8, 5:23 pm)
Re: Git rescue mission, Kalle Pokki, (Thu Feb 8, 6:03 pm)
Re: Git rescue mission, Shawn O. Pearce, (Thu Feb 8, 6:10 pm)
Re: Git rescue mission, Kalle Pokki, (Fri Feb 9, 3:21 pm)
Re: Git rescue mission, Theodore Tso, (Thu Feb 8, 9:48 pm)
Re: Git rescue mission, Shawn O. Pearce, (Thu Feb 8, 9:58 pm)
Re: Git rescue mission, Theodore Ts'o, (Sat Feb 10, 12:05 pm)
[PATCH] Allow aliases to expand to shell commands, Theodore Ts'o, (Sat Feb 10, 12:05 pm)
Re: [PATCH] Allow aliases to expand to shell commands, Theodore Tso, (Sat Feb 10, 2:13 pm)
Re: [PATCH] Allow aliases to expand to shell commands, Johannes Schindelin, (Sat Feb 10, 4:34 pm)
Re: [PATCH] Allow aliases to expand to shell commands, Theodore Tso, (Sat Feb 10, 8:13 pm)
Re: [PATCH] Allow aliases to expand to shell commands, Johannes Schindelin, (Sun Feb 11, 12:03 pm)
Re: [PATCH] Allow aliases to expand to shell commands, Theodore Tso, (Sun Feb 11, 12:21 pm)
Re: [PATCH] Allow aliases to expand to shell commands, Junio C Hamano, (Sun Feb 11, 5:44 pm)
Re: [PATCH] Allow aliases to expand to shell commands, Theodore Tso, (Sun Feb 11, 11:56 pm)
Re: [PATCH] Allow aliases to expand to shell commands, Shawn O. Pearce, (Mon Feb 12, 2:53 am)
Re: [PATCH] Allow aliases to expand to shell commands, Johannes Schindelin, (Sun Feb 11, 6:03 pm)
Re: [PATCH] Allow aliases to expand to shell commands, Johannes Schindelin, (Sun Feb 11, 12:36 pm)
Re: [PATCH] Allow aliases to expand to shell commands, Linus Torvalds, (Sat Feb 10, 2:04 pm)
Re: Git rescue mission, Bill Lear, (Thu Feb 8, 5:57 pm)
Re: Git rescue mission, Linus Torvalds, (Thu Feb 8, 6:13 pm)
Re: Git rescue mission, Junio C Hamano, (Fri Feb 9, 12:38 am)
Re: Git rescue mission, Bill Lear, (Thu Feb 8, 7:25 pm)
Re: Git rescue mission, Linus Torvalds, (Thu Feb 8, 7:46 pm)
Re: Git rescue mission, Shawn O. Pearce, (Thu Feb 8, 7:33 pm)
Re: Git rescue mission, Bill Lear, (Thu Feb 8, 7:40 pm)
Re: Git rescue mission, Linus Torvalds, (Thu Feb 8, 8:17 pm)
Re: Git rescue mission, Michael S. Tsirkin, (Fri Feb 9, 4:58 am)
Re: Git rescue mission, Jakub Narebski, (Thu Feb 8, 8:03 pm)
Re: Git rescue mission, Shawn O. Pearce, (Thu Feb 8, 7:50 pm)
Re: Git rescue mission, Bill Lear, (Thu Feb 8, 6:33 pm)
Re: Git rescue mission, Jakub Narebski, (Thu Feb 8, 6:29 pm)
Re: Git rescue mission, Johannes Schindelin, (Wed Feb 7, 8:22 pm)
Re: Git rescue mission, Bill Lear, (Wed Feb 7, 8:24 pm)
Re: Git rescue mission, Johannes Schindelin, (Wed Feb 7, 8:25 pm)
Re: Git rescue mission, Bill Lear, (Wed Feb 7, 8:34 pm)
Re: Git rescue mission, Junio C Hamano, (Wed Feb 7, 8:48 pm)
Re: Git rescue mission, Alexander Litvinov, (Thu Feb 8, 12:28 am)
Re: Git rescue mission, Junio C Hamano, (Thu Feb 8, 8:53 pm)
Re: Git rescue mission, Alexander Litvinov, (Thu Feb 8, 11:32 pm)
Re: Git rescue mission, Bill Lear, (Thu Feb 8, 11:27 am)
Re: Git rescue mission, Jeff King, (Thu Feb 8, 7:24 pm)
Re: Git rescue mission, Bill Lear, (Thu Feb 8, 7:32 pm)