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

Re: Why can't git open empty branches ?

From
HDHadmut Danisch <hadmut@danisch.de>
Date
Apr 11, 2012, 11:06 UTC
Message-ID
<4F8565BC.1070701@danisch.de>
In-Reply-To
<20120411105906.GA19823@burratino>
Am 11.04.2012 12:59, schrieb Jonathan Nieder:
> 	git checkout --orphan <new branch>
> 	git rm -fr .
I would have expected something more obvious and intuitive like
  git branch --empty

It is not really plausible to create a new branch by checking out a non-existing one.

However, this helps. Thanks.
Previous: Jonathan NiederNext: Matthieu Moy
Message 3 of 8 in “Why can't git open empty branches ?”
  1. Hadmut DanischApr 11, 2012
  2. Jonathan NiederApr 11, 2012
  3. Hadmut DanischApr 11, 2012
  4. Matthieu MoyApr 11, 2012
  5. Hadmut DanischApr 11, 2012
  6. Jonathan NiederApr 11, 2012
  7. Matthieu MoyApr 11, 2012
  8. Holger HellmuthApr 11, 2012

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.