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
#!/bin/bash | |
# Deletes branches that have been removed on origin | |
function no_remote() { | |
if git rev-parse --git-dir >/dev/null 2>&1; then | |
git fetch --prune | |
echo "Branches with no remote:" | |
git branch -vv | cut -c 3- | awk '$3 !~/\[/ { printf " %s\n", $1 }' | |
echo -e "\nDeleting branches with deleted remote:" | |
del=$(git branch -vv | awk '$4 ~/gone\]/ { printf "git branch -D %s && ", $1 }') |
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
function diff-branch() { | |
if [ -z $1 ]; then | |
echo please provide an branch | |
read WORKBRANCH | |
else | |
WORKBRANCH=$1 | |
fi | |
if [ -z $2 ]; then | |
STABLEBRANCH='master' |
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
#!/bin/bash | |
# Stop all containers | |
containers=`docker ps -a -q` | |
if [ -n "$containers" ] ; then | |
docker stop $containers | |
fi | |
# Delete all containers | |
containers=`docker ps -a -q` | |
if [ -n "$containers" ]; then | |
docker rm -f -v $containers |