Skip to content

Commit

Permalink
end on master
Browse files Browse the repository at this point in the history
  • Loading branch information
ddollar committed Aug 27, 2016
1 parent 159e45c commit db885c5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions git-cleanup
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

set -e

die() { echo $*; exit 1; }

[ -z "$(git status --porcelain)" ] || die "must have clean git working tree"

git for-each-ref --format='%(refname:strip=2)' refs/heads/ | while read branch; do
if [ -z "$(git log master..$branch)" ] && [ "$branch" != "master" ]; then
git branch -D $branch
fi
done
1 change: 1 addition & 0 deletions git-rebase-features
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ git for-each-ref --format='%(refname:strip=2)' refs/heads/ | while read branch;
fi
done

git checkout master

0 comments on commit db885c5

Please sign in to comment.