add some more git commands

This commit is contained in:
Sami Samhuri 2015-06-10 10:46:14 -07:00
parent c6acac3e86
commit b6536f3061
2 changed files with 15 additions and 0 deletions

View file

@ -0,0 +1,3 @@
#!/bin/sh
git diff-tree --cc $1

12
git-remove-merged-branches Executable file
View file

@ -0,0 +1,12 @@
#!/bin/bash
REMOTE="${1:-origin}"
BRANCH="${2:-master}"
git branch -r --merged |
grep "\b${REMOTE}/" |
grep -vE "HEAD|master|${BRANCH}" |
xargs -L1 |
sed -e "s/${REMOTE}\///" |
xargs git push "$REMOTE" --delete