Automate maintenance of old outdated branches
I work with GitHub a lot, through PR with my team.
Whenever a PR is merged, the remote branch is automatically deleted from GitHub, but I am left with the local version of it. From time to time a go around and delete those old branches but it's a bit tedious.
I would love it if there were some sort of "maintenance" tooling to automatically clean up my working copy, by deleting those old branches. This is currently made worse by the fact that when deleting a branch, the window sometimes scrolls back to the top.
This could also be a nice addition for all stashes that I created but forgot to clean up, or the automatic ones created when rebasing.
Comments: 14
-
30 Aug, '21
Santiago G. MergedAs a user I would like to have the possibility to enable an option that autoprunes local branches that were deleted in the remote repository as long as it's not checked out.
-
13 Sep, '21
Lyndon Gingerich MergedI think this is a duplicate of https://feedback.gitkraken.com/suggestions/191722/automate-maintenance-of-old-outdated-branches.
-
14 Sep, '21
Jonathan Admin"Support for autoprune local branches" (suggested by Santiago G. on 2021-08-30), including upvotes (2) and comments (0), was merged into this suggestion.
-
31 Jan, '22
J EdwardsJust chiming in that this feature would be a fantastic addition to this product. Is it likely coming in the foreseeable future?
-
22 Feb, '22
ZachCame here from Google checking to see if this was already included.
+1 it would be nice to have local branch pruning, automatic or on a button. -
23 Feb, '22
Frank OosterhuisI wanted to suggest a similar option.
I delete old branches by fireing up a terminal and execute "git branch -d `git branch -v | grep gone | awk '{ print $1 '}` "
Would love to see this under a button or a shortcut. -
11 Mar, '22
Aurelien RBI also would like an auto clean feature: I merge a lot of branches and spend many clicks per day cleaning local branches that have been merged on the origin
-
31 Mar, '22
Uğur EkşiWe as a team make commits on a daily basis, create branches of our own, then merge them to a single branch. Then I am left with several redundant branches in my local. I would really like to do it automatically instead of deleting branches one by one.
-
11 Apr, '22
Stephan van StekelenburgFork for example shows branches with a different icon based on the remote status.
From their changelog:
>> Show different branch icons according to upstream status
>> We added little icons to indicate the upstream status of local branches. There are different icons for branches that are
>> local only,
>> pushed upstream,
>> pushed upstream but their remote branch has been removed. -
29 Jun, '22
SamAgree, this would be helpful. Fork's upstream status icons are extremely useful.
-
08 Jul, '22
ThomasGit Extensions tells me when I have a local branch whose remote was deleted. Very nice to know which feature branches are completed and can be removed.
-
11 Jul, '22
crogersbump, this would be very useful for my company as well.
-
09 Jan
DimiOur company would also appreciate a way to delete obsolete local branches!
-
03 Feb
VioletaWe would also appreciate this feature :)