Re: Question about 'branch -d' safety
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Jul 19, 2010, 20:36 UTC
- Message-ID
- <201007192236.21786.jnareb@gmail.com>
- In-Reply-To
- <4C448879.4040202@workspacewhiz.com>
On Mon, 19 Jul 2010, Joshua Jensen wrote:
Show 12 quoted lines
> My brain has become muddied with all the ~2 stuff. Explain again why it
> can't be as simple as this?
>
> git branch -d integration
>
> git reflog
>
> 0000001 HEAD@{0}: (fake)checkout: moving from integration to master
> (0000001)
> 8000000 HEAD@{1}: branch -d: Deleting integration
> 0000001 HEAD@{2}: (fake)checkout: moving from master to integration
> (8000000)Because 'integration' branch nowadays might have been never checked out, and not be in HEAD, even though 'git branch -d integration' works. Stuffing unrelated events in HEAD reflog, instead of having it be action history of HEAD symref is IMVHO a bad idea.
-- Jakub Narebski Poland