Created
July 14, 2017 02:03
-
-
Save mtibben/f70a671b960fafa81013f8d952de290c to your computer and use it in GitHub Desktop.
git utils
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 remote prune origin | |
git branch -r --merged origin/master \ | |
| grep -v '>' \ | |
| grep -v master \ | |
| sed -E "s|^ *origin/||g" |
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
for k in $(git branch -r | grep -v '>' | sed /\*/d); do | |
if [ -z "$(git log -1 --since='1 years ago' -s $k)" ]; then | |
branch_name_with_no_origin=$(echo $k | sed -e "s/origin\///") | |
echo $(git show -s --format="%aE" $k) $branch_name_with_no_origin | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment