File tree Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ if test $# = 0; then
3+ OLD=` git write-tree`
4+ elif test " $1 " = --cached; then
5+ OLD=HEAD
6+ NEW=` git write-tree`
7+ shift
8+ fi
9+ if test $# -gt 0; then
10+ OLD=" $1 " ; shift
11+ fi
12+ test $# -gt 0 && test -z " $CACHED " && NEW=" $1 "
13+ TMPDIR1=` mktemp -d`
14+ git archive --format=tar $OLD | (cd $TMPDIR1 ; tar xf -)
15+ if test -z " $NEW " ; then
16+ TMPDIR2=$( git rev-parse --show-cdup)
17+ test -z " $cdup " && TMPDIR2=.
18+ else
19+ TMPDIR2=` mktemp -d`
20+ git archive --format=tar $NEW | (cd $TMPDIR2 ; tar xf -)
21+ fi
22+
23+ opendiff $TMPDIR1 $TMPDIR2 | cat
24+ rm -rf $TMPDIR1
25+ test ! -z " $NEW " && rm -rf $TMPDIR2
26+
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ git ls-files --deleted -z | xargs -0 git rm
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ branch_name=$1
4+ git checkout --track -b ${branch_name} origin/${branch_name}
You can’t perform that action at this time.
0 commit comments