Skip to content

Commit 772286a

Browse files
committed
Add two new scripts
1 parent ac1cb7a commit 772286a

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

git-pr

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
# Based on https://gist.github.com/gnarf/5406589
3+
4+
if test "$1" = "clean"; then
5+
git for-each-ref refs/heads/pr/* --format='%(refname)' | while read ref; do
6+
git branch -D ${ref#refs/heads/}
7+
done
8+
else
9+
test -z $1 && echo "pr number required." 1>&2 && exit 1
10+
git fetch -fu ${2:-origin} refs/pull/$1/head:pr/$1 && git checkout pr/$1
11+
fi

git-pulltree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
git subtree pull --prefix $1 ext/$(basename $1) master --squash

0 commit comments

Comments
 (0)