From: Linus Torvalds Date: Wed, 09 Nov 2005 18:36:50 GMT Subject: Re: Real-life kernel debugging scenario Message-ID: In-Reply-To: On Wed, 9 Nov 2005, wa1ter@myrealbox.com wrote: > > The built-in variable ORIG_HEAD isn't explained anywhere AFAICT, or at > least it wasn't until today. Are there other such magic variables which > might be useful for us to know about? No, ORIG_HEAD is pretty much it. There's a few special files that a non-committed merge leaves around (either because you asked it to not be committed, or because it had clashes and requires manual fixing), but they are not normally useful to any regular people. You can poke around in the ".git" directory after such a merge if you want (MERGE_HEAD, MERGE_MSG). ORIG_HEAD is _very_ useful, though, and I use it all the time. Any time you've pulled something from somebody else, and you wonder what you pulled, just go gitk ORIG_HEAD.. and you'll see exactly what new stuff you got in your branch. I often do that command line several times a day as I merge stuff. Otherwise the new stuff tends to be hidden in the noise. (There's also FETCH_HEAD, which is the head of the last fetch, so if you aren't interested in any potential merge, you could instead use the range ORIG_HEAD..FETCH_HEAD, but quite frankly, I doubt anybody really cares except for the internal git fetching/pulling logic). Linus