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

Re: Can someone confirm what the contents of refs/heads/master means?

From
PHPeter Harris <git@peter.is-a-geek.org>
Date
Dec 8, 2008, 19:55 UTC
Message-ID
<eaa105840812081155j1e402226i896a7ad3061966e1@mail.gmail.com>
In-Reply-To
<f95d47890812081142k575264fctd77254ed3386a069@mail.gmail.com>
On Mon, Dec 8, 2008 at 2:42 PM, David Copeland wrote:
Show 6 quoted lines
> Thanks for the info :)
>
> The reason I edited by hand is when I was on trunk (e.g. git checkout
> trunk), I did a git svn dcommit and it worked, but said "you aren't on
> a branch", so I was concerned I might be in some weird state (i.e. if
> trunk isn't a branch, can I make a branch off of it?)

Trunk is a "remote branch", so you can't check it out. If you try, you get what is called a "detached HEAD".

http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#detached-head
And, yes, you can make a local branch off of a remote branch.
Peter Harris
Previous: David CopelandNext: Björn Steinbrink
Message 4 of 6 in “Can someone confirm what the contents of refs/heads/master means?”
  1. davetron5000Dec 8, 2008
  2. Peter HarrisDec 8, 2008
  3. David CopelandDec 8, 2008
  4. Peter HarrisDec 8, 2008
  5. Björn SteinbrinkDec 8, 2008
  6. David CopelandDec 8, 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.