git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] branch: implement shortcut to delete last branch
@ 2018-03-27 18:46 Aaron Greenberg
  2018-03-27 18:46 ` Aaron Greenberg
  0 siblings, 1 reply; 10+ messages in thread
From: Aaron Greenberg @ 2018-03-27 18:46 UTC (permalink / raw)
  To: gitster; +Cc: git

With the approvals listed in [*1*] and in accordance with the
guidelines set out in Documentation/SubmittingPatches, I am submitting
this patch to be applied upstream.

After work on this patch is done, I'll look into picking up where the
prior work done in [*2*] left off.

Is there anything else that needs to be done before this can be
accepted?

[Reference]

*1* https://public-inbox.org/git/1521844835-23956-2-git-send-email-p@aaronjgreenberg.com/
*2* https://public-inbox.org/git/1488007487-12965-1-git-send-email-kannan.siddharth12@gmail.com/


^ permalink raw reply	[flat|nested] 10+ messages in thread
* [PATCH] branch: implement shortcut to delete last branch
@ 2018-03-23  2:09 Aaron Greenberg
  2018-03-23  2:09 ` Aaron Greenberg
  2018-03-23  8:56 ` Jeff King
  0 siblings, 2 replies; 10+ messages in thread
From: Aaron Greenberg @ 2018-03-23  2:09 UTC (permalink / raw)
  To: git; +Cc: peff, p

This patch gives git-branch the ability to delete the previous
checked-out branch using the "-" shortcut. This shortcut already exists
for git-checkout, git-merge, and git-revert. One of my common workflows
is to do some work on a local topic branch and push it to a remote,
where it gets merged in to 'master'. Then, I switch back to my local
master, fetch the remote master, and delete the previous topic branch.

$ git checkout -b topic-a
$ # Do some work...
$ git commit -am "Implement feature A"
$ git push origin topic-a

# 'origin/topic-a' gets merged into 'origin/master'

$ git checkout master
$ git branch -d topic-a
$ # With this patch, a user could simply type
$ git branch -d -

I think it's a useful shortcut for cleaning up a just-merged branch
(or a just switched-from branch.)


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-03-27 19:26 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-27 18:46 [PATCH] branch: implement shortcut to delete last branch Aaron Greenberg
2018-03-27 18:46 ` Aaron Greenberg
2018-03-27 19:11   ` Jonathan Nieder
2018-03-27 19:23   ` Ævar Arnfjörð Bjarmason
2018-03-27 19:26     ` Ævar Arnfjörð Bjarmason
  -- strict thread matches above, loose matches on Subject: below --
2018-03-23  2:09 Aaron Greenberg
2018-03-23  2:09 ` Aaron Greenberg
2018-03-23  8:56 ` Jeff King
2018-03-23  9:00   ` Jeff King
2018-03-23 22:40   ` [PATCH v2] " Aaron Greenberg
2018-03-23 22:40     ` [PATCH] " Aaron Greenberg

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 NNTP newsgroup(s).