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

Re: making a branch with just one file and keeping its whole history

From
EREric Raible <raible@gmail.com>
Date
Jul 21, 2008, 18:22 UTC
Message-ID
<279b37b20807211122w3a1e0687wc84693bd95689326@mail.gmail.com>
In-Reply-To
<alpine.DEB.1.00.0807211907270.8986@racer>

On Mon, Jul 21, 2008 at 11:08 AM, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:

Show 15 quoted lines
>
> On Mon, 21 Jul 2008, Eric Raible wrote:
>
>> http://www.gitcasts.com/posts/empty-branches
>
> Beware!  This is one of the sites that triggered my mail about considering
> teaching plumbing to new users harmful.
>
> In other words, I think that these "git casts" are not really the best way
> to teach Git to new users, but rather confusing.
>
> Which is a pity, because they are nicely done otherwise.
>
> Ciao,
> Dscho

I understand your concern, but if you treat that particular gitcast simple as a recipe to be followed it accomplishes the goal in the in the most straightforward way I've seen.

A new-user pure-porcelain way would be to branch then delete all of the files in the branch. Which seems a bit dirty to me.

Or is there some more intuitive porcelain-ish way of creating a new empty branch that I haven't thought of?

- Eric
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 4 of 7 in “making a branch with just one file and keeping its whole history”
  1. ncrfgs@tin.itJul 21, 2008
  2. Eric RaibleJul 21, 2008
  3. Johannes SchindelinJul 21, 2008
  4. Eric RaibleJul 21, 2008
  5. Johannes SchindelinJul 21, 2008
  6. extracting the history of a single file as a new project [Was: Re: making a branch with just one file and keeping its whole]ncrfgs@tin.it, Jul 22, 2008
  7. Sverre RabbelierJul 22, 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.