Created
February 21, 2022 10:42
-
-
Save meysampg/e016f0be5a069522d9555f19a19bb46b to your computer and use it in GitHub Desktop.
Cleanup Git Repository
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
# git config --global --edit | |
[alias] | |
cleanup = "!git branch --merged master | grep -v '\\*\\|master\\|main\\|develop' | xargs -n 1 -r git branch -d" | |
cleanup-remote = "!git branch --remote --merged master | grep -v '\\*\\|master\\|main\\|develop' | xargs -n 1 -r git branch -r -d" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment