Re: Automatically delete branches containing accepted patches?
- From
Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.de>
- Date
- Aug 28, 2017, 07:44 UTC
- Message-ID
- <5c316336-19b4-c78e-6d14-001c2ff1c34c@suse.de>
- In-Reply-To
- <8AF4A868-628B-42AE-B75E-4DF19F7C7A89@gmail.com>
You could rebase your branches onto the upstream branch. Once all the patches are in, the SHA1 of the rebased branch is somewhere in the history of the upstream master.
I use a set of scripts I've written to handle multiple branches: https://github.com/nmorey/git-topic-branches
Using namesapce it knows which branch is against which ref. You can autorebase everythinmg. It'll tell you once everything is merged upstream: $ git auto-rebase # alias for branch-autorebase REBASING: dev/cbuild-cleanup on origin/master REBASING FAILURE: dev/cbuild-cleanup on origin/master REBASING: dev/cbuild-return-code on origin/master REBASING: dev/suse-spec2 on origin/master INTEGRATED UPSTREAM: dev/suse-spec2 just made it into origin/master REBASING: dev/udev.md on origin/master INTEGRATED UPSTREAM: dev/udev.md just made it into origin/master
You should be able to either hook up something for auto deletion, or use the few helpers to detect the merged ones and delete them
Le 27/08/2017 à 20:44, Lars Schneider a écrit :
Show 12 quoted lines
> Hi, > > I have lots of git/git branches and once in a while some patches make it > into git/git master. If this happens I would like to delete my branch > with the patch automatically. That's not easily possible as the hashes > on my branches are, of course, not the same as the hashes on git/git. > > How do you deal with this situation? Do you manually delete your > branches or do you have some clever script to share? > > Thanks, > Lars