Re: Parent-less branches
- From
- Sverre Rabbelier <alturin@gmail.com>
- Date
- May 3, 2008, 00:46 UTC
- Message-ID
- <bd6139dc0805021746q40b384c3nb36a8605d9475a7f@mail.gmail.com>
- In-Reply-To
- <m38wys6y1q.fsf@localhost.localdomain>
On Sat, May 3, 2008 at 2:17 AM, Jakub Narebski <jnareb@gmail.com> wrote:
Show 6 quoted lines
> In short the solution is to create content-less branch using: > > $ git symbolic-ref HEAD refs/heads/newbranch > $ rm .git/index > > then commit.
I guess what Pedro is asking is if there isn't a builtin way to do this. Which, if I understand correctly, there isn't. Perhaps though something like "git branch -N newbranchname" which then creates a new parentless branch. It could just be a shell script that does the above, but I wonder if there are no side-effects of the above? It sounds somewhat 'messy' to remove the index? Too 'low level' to do for a user I mean, what if sometime in the future we decide to store something in the index that -is- important? I reckon it would be cleaner to add an option for this.
-- Cheers, Sverre Rabbelier