Last active
February 2, 2023 15:32
-
-
Save bwlt/7f3adf423da4e3f20db18c9daf109f4b to your computer and use it in GitHub Desktop.
shell alias, useful for cleanup local branches when the remote branch has been deleted (for example merged branch)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# useful for cleanup local branches when the remote branch has been deleted (for example merged branch) | |
gdgone='git branch -v | grep " \[gone\] " | awk '\''{ print $1 }'\'' | xargs git branch -D' | |
# updates the local repository branches to the latest and performs cleanup. | |
# gf, gco and gl are alias for git fetch, git checkout and git pull | |
gstart='gf -p && gco master && gdgone && gl && gco develop && gl' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment