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

Re: [RFC] Introduce .git/BRANCH to point to the current branch

From
Matthieu Moy <matthieu.moy@imag.fr>
Date
Dec 4, 2007, 21:32 UTC
Message-ID
<vpq4peyjgd7.fsf@bauges.imag.fr>
In-Reply-To
<7vir3e428i.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
> Having said that, I am not sympathetic to "I have to remember".

That's definitely not an important point, but I find it conveinient, for example in hg, to be able to just "hg update" to get to the tip of a branch.

A use-case (which joins the one of Salikh actually) is to publish both a repository and a working tree (I do that for my collegues which may or (usually) may not use git). Making a hook to update the working tree after a push is a terrible hack in git, and just "hg update" in Mercurial.

(once again, that's one point in favor of base separate from current branch, but it doesn't cancel the possible drawbacks. It seems the thread "Reverting the whole index-base series" at http://thread.gmane.org/gmane.comp.version-control.git/44360/focus=44525 is interesting to read, I'll dig a bit more.

As you mention in the thread, detaching head when pushing to a checked-out branch would probably be an interesting option)

-- 
Matthieu
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 14 in “[RFC] Introduce .git/BRANCH to point to the current branch”
  1. Salikh ZakirovDec 4, 2007
  2. Matthieu MoyDec 4, 2007
  3. Jakub NarebskiDec 4, 2007
  4. Junio C HamanoDec 4, 2007
  5. Matthieu MoyDec 4, 2007
  6. Junio C HamanoDec 4, 2007
  7. git-checkout --push/--popNanako Shiraishi, Dec 4, 2007
  8. Junio C HamanoDec 5, 2007
  9. Matthieu MoyDec 5, 2007
  10. David KågedalDec 5, 2007
  11. Robin RosenbergDec 6, 2007
  12. Salikh ZakirovDec 4, 2007
  13. Junio C HamanoDec 4, 2007
  14. Jakub NarebskiDec 4, 2007

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.