From: Ramkumar Ramachandra <artagnon@gmail.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: Git List <git@vger.kernel.org>
Subject: Re: [RFC] Delete current branch
Date: Fri, 19 Jul 2013 20:05:29 +0530 [thread overview]
Message-ID: <CALkWK0kGF+d8Jk-TVfb6iwk6LuOcD-Uuuj6DHf-4YeVAFLSvuw@mail.gmail.com> (raw)
In-Reply-To: <87y592y67f.fsf@igel.home>
Andreas Schwab wrote:
> Ramkumar Ramachandra <artagnon@gmail.com> writes:
>
>> # er, what was the branch name again?
>> $ git checkout -
>
> You could take a look in the reflog.
Yeah, or use the @{-N} revision to do that for me. My scripted
version is essentially:
test "true" = "$(git rev-parse --is-inside-work-tree 2>/dev/null)" || exit 1
git checkout master
git branch -D @{-1}
The main problem is the hard-coding of "master": I suppose I could
replace that with @{-1} too.
Not a big deal: I was just wondering if others use it often enough for
it to become `branch -Dc` in core; @{-N} is quite obscure.
next prev parent reply other threads:[~2013-07-19 14:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-19 10:35 [RFC] Delete current branch Ramkumar Ramachandra
2013-07-19 14:28 ` Andreas Schwab
2013-07-19 14:35 ` Ramkumar Ramachandra [this message]
2013-07-19 15:08 ` Junio C Hamano
2013-07-19 15:42 ` Ramkumar Ramachandra
2013-07-19 16:48 ` Junio C Hamano
2013-07-19 16:50 ` Ramkumar Ramachandra
2013-07-19 17:08 ` Taylor Hedberg
2013-07-19 19:15 ` Junio C Hamano
2013-07-19 22:52 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CALkWK0kGF+d8Jk-TVfb6iwk6LuOcD-Uuuj6DHf-4YeVAFLSvuw@mail.gmail.com \
--to=artagnon@gmail.com \
--cc=git@vger.kernel.org \
--cc=schwab@linux-m68k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).