Last active
August 10, 2017 14:18
-
-
Save kinncj/4b1979893ee4458162c72c617098685c to your computer and use it in GitHub Desktop.
few things
This file contains 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
# ~/.bash_profile | |
# ... | |
# Docker cleanup | |
dcleanup(){ | |
docker rm -v $(docker ps --filter status=exited -q 2>/dev/null) 2>/dev/null | |
docker rmi $(docker images --filter dangling=true -q 2>/dev/null) 2>/dev/null | |
} | |
# Git cleanup | |
gitcleanup() { | |
git fetch -p && for branch in `git branch -vv | grep ': gone]' | gawk '{print $1}'`; do git branch -D $branch; done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment