Skip to content

Cleans local, merged branches that still track obsolete remote refs

License

Notifications You must be signed in to change notification settings

deliciousinsights/git-clean-stale-local

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SYNOPSIS

git clean-stale-local [-n|--dry-run]

This contrib script is to be run inside a local Git repo. It looks for local branches merged into the default branch that track now-pruned remote branches on origin, and deletes these refs.

Yes, this assumes your main remote is origin.

No, it doesn't assume your default branch is master: it will look at your locally cached ref for origin/HEAD and, if there is none, will fetch that from the origin remote itself (failing that, it'll abort).

You can use the traditional -n / --dry-run flag to list the would-be removals without running them.

About

Cleans local, merged branches that still track obsolete remote refs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages