Sort deleted branches from all branches
See original GitHub issueDescribe the feature or problem you’d like to solve
When I merge a pull request and delete the branch I’m working on, or when I simply delete the branch because it’s unnecessary, the local branch still appears in the Recent
branches section of the branch user interface in the app.
Proposed solution
Currently branches are sorted by Default
, Recent
, and Other
. I’m proposing we add a Deleted
section. As noted in this issue #5893, the team has avoided deleting local branches because it’s a destructive action.
I think adding a Deleted
section would help solve the problem of having branches all mixed in together completely unsorted in Recents
(and Other
). It’d circumvent the headache of destroying the local copy of the branch as well.
Additional context
Related Issues
Issue Analytics
- State:
- Created 3 years ago
- Reactions:7
- Comments:9
Top Results From Across the Web
git - Delete all branches that are more than X days/weeks old
Use git branch -r --sort=committerdate | xargs echo (says kustomrtr) to review the remote branches, than git push origin -d 1_branch 2_branch to...
Read more >Git housekeeping tutorial: clean-up outdated branches in local ...
Now, remove all outdated branches with: ... Now, you can delete own remote branches, and ask other authors to clean-up theirs:
Read more >Git Delete Branch How-To, for Both Local and Remote
This post is all about the Git delete branch operation. You'll learn how to delete branches, both locally and in your remote repositories,...
Read more >Git - git-branch Documentation
List or delete (if used with -d) the remote-tracking branches. Combine with --list to match the optional pattern(s). -a; --all. List both remote-tracking ......
Read more >How to Delete Local and Remote Git Branches - Refine Dev
Solution: Yes, you should use git reflog command and find the SHA1 for the commit at the tip of your deleted branch, then...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Github Desktop will prune a local copy of the repository if that repository is connected to Github.com.
Pruning only happens after 14 days on branches where there’s no un-merged work. https://github.com/desktop/desktop/issues/750#issuecomment-644805099
I’m proposing that local branches deleted on Github.com are moved to a ‘Deleted’ section so as to convey that they’re marked for deletion/pruning.
It’d be nice if there was an option to reduce the pruning wait period to 0 days but I understand they want to be careful about what they add when it comes to deletion.
If a branch is deleted it should not be displayed at all. If I delete something, I don’t want it to go in a different section, I want it gone. Maybe the ability to archive branches would be a better fit?