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

Re: [PATCH v3] git checkout: create unparented branch by --orphan

From
PBPeter Baumann <waste.manager@gmx.de>
Date
Mar 21, 2010, 17:14 UTC
Message-ID
<20100321171431.GE2557@m62s10.vlinux.de>
In-Reply-To
<1269185678-3039-1-git-send-email-erick.mattos@gmail.com>
On Sun, Mar 21, 2010 at 12:34:38PM -0300, Erick Mattos wrote:
Show 9 quoted lines
> Similar to -b, --orphan creates a new branch, but it starts without any
> commit.  After running "git checkout --orphan newbranch", you are on a
> new branch "newbranch", and the first commit you create from this state
> will start a new history without any ancestry.
> 
> "git checkout --orphan" keeps the index and the working tree files
> intact in order to make it convenient for creating a new history whose
> trees resemble the ones from the original branch.
> 

Sorry to skim in so late but --orphan sounds - at least to me as a non native speaker - a little strange. Yes, I know it means "without parents", but actually it would be the *last* thing I would search for after opening the manpage.

Wouldn't --empty-parent or --no-parent describe the situation better? It actually has the benefit that it would match on a search for /parent/, which I would have searched for if I want to create a new empty branch.

-- Peter

Previous: Erick MattosNext: Erick Mattos
Message 2 of 13 in “git checkout: create unparented branch by --orphan”
  1. git checkout: create unparented branch by --orphanErick Mattos, Mar 21, 2010
  2. Peter BaumannMar 21, 2010
  3. Erick MattosMar 21, 2010
  4. Junio C HamanoMar 21, 2010
  5. Erick MattosMar 21, 2010
  6. Michael J GruberMar 22, 2010
  7. Chris JohnsenMar 22, 2010
  8. Erick MattosMar 22, 2010
  9. Junio C HamanoMar 21, 2010
  10. Chris JohnsenMar 22, 2010
  11. Erick MattosMar 22, 2010
  12. Translating error messages in Git (was: Re: [PATCH v3] git checkout: create unparented branch by --orphan)Jakub Narebski, Mar 22, 2010
  13. Junio C HamanoMar 22, 2010

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.