git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Updated Kernel Hacker's guide to git

From
Salikh Zakirov <salikh@gmail.com>
Date
Dec 25, 2007, 13:08 UTC
Message-ID
<477100BB.6020301@gmail.com>
In-Reply-To
<476E42BF.1010300@garzik.org>
Jeff Garzik wrote:
> The kernel hacker's guide to git has received some updates: 
> http://linux.yyz.us/git-howto.html

I have some comments on the contents, though I need to warn, that I've been following git development for about year and a half now, and I am not a kernel hacker, so my comments may have wrong bias.

Show 7 quoted lines
>     Obtain a diff between current branch, and master branch
> 
> In most trees with branches, .git/refs/heads/master contains the
> current 'vanilla' upstream tree, for easy diffing and merging. (in
> trees without branches, 'master' simply contains your latest changes)
> 
> $ git diff master..HEAD

IMHO, syntax 'git diff master HEAD' is preferable, in order to avoid confusion with 'git log master..HEAD' usage, which has quite different meaning, roughly expressible as

  git diff `git merge-base master HEAD` HEAD
for getting one big diff of the changes in HEAD since master)
> (this is equivalent to git diff HEAD, when used with HEAD branch)

This seems incorrect to me, as 'git diff master HEAD' compares two revisions, while 'git diff HEAD' compares working tree with HEAD revision.

Besides, expression 'HEAD branch' is misleading, because HEAD is not a branch by itself, but rather a link to the latest state of the current branch.

Previous: Miklos VajnaNext: Jan Engelhardt
Message 12 of 19 in “Re: Updated Kernel Hacker's guide to git”
  1. Horst H. von BrandDec 24, 2006
  2. Updated Kernel Hacker's guide to gitJeff Garzik, Dec 23, 2007
  3. Robert P. J. DayDec 23, 2007
  4. Jeff GarzikDec 23, 2007
  5. Robert P. J. DayDec 23, 2007
  6. Dieter RiesDec 23, 2007
  7. Robert P. J. DayDec 23, 2007
  8. Stefan RichterDec 23, 2007
  9. Robert P. J. DayDec 24, 2007
  10. WANG CongDec 23, 2007
  11. Miklos VajnaDec 24, 2007
  12. Salikh ZakirovDec 25, 2007
  13. Jan EngelhardtDec 31, 2007
  14. Stefan RichterDec 31, 2007
  15. Junio C HamanoDec 31, 2007
  16. Jeff GarzikJun 30, 2008
  17. Stefan RichterJun 30, 2008
  18. Jeff GarzikJun 30, 2008
  19. Christian CouderJul 3, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.