From: Eric Sunshine Date: Mon, 21 Mar 2016 17:56:10 GMT Subject: Re: [PATCH][Outreachy] branch -D: allow - as abbreviation of @{-1} Message-ID: In-Reply-To: On Mon, Mar 21, 2016 at 1:47 PM, Junio C Hamano wrote: > Matthieu Moy writes: >> But I'm not sure how often people want to delete (force-delete according >> to your message) the branch they just come from. > > One that I heard was this sequence: > > $ git checkout -b work master > $ work work work ... > $ git checkout master > $ git merge work > $ git branch -d work > > where their argument was that they are done with the work branch, > and it no longer is needed. I frequently use throwaway branches when messing around with some idea or when reviewing patches submitted to the mailing list, and the workflow ends up being similar to the above: $ git checkout -b throwaway master $ ...work work work... $ git checkout master $ git branch -D throwaway So, I can see how having "git branch -D" (force-delete) recognize "-" could be a convenience.