add some more git commands
This commit is contained in:
parent
c6acac3e86
commit
b6536f3061
2 changed files with 15 additions and 0 deletions
3
git-diff-merge-conflict-resolution
Executable file
3
git-diff-merge-conflict-resolution
Executable file
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
git diff-tree --cc $1
|
||||||
12
git-remove-merged-branches
Executable file
12
git-remove-merged-branches
Executable 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
|
||||||
|
|
||||||
Loading…
Reference in a new issue