Last active
September 22, 2020 06:22
-
-
Save innocarpe/d13e175f4222671614f66ff6d15db659 to your computer and use it in GitHub Desktop.
Pull remote branch & Delete merged branches.
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
#!/bin/bash | |
# Pull remote branch & Delete merged branches. | |
# 1. Move this file to ~/.gitsh/ | |
# 2. Add directory path($YOUR_HOME_PATH/.gitsh) to environment variable file | |
# (like ~/.bash_profile or ~/.zshrc) | |
# (This would be like 'export PATH=${PATH}:/Users/YOUR_HOME_PATH/.gitsh') | |
# 3. chmod 0755 git-pp | |
# 4. Use the command 'git pp' | |
git pull --prune | |
git branch --v | grep "\[gone\]" | awk '{print $1}' | xargs git branch -D |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment