diff --git a/.rc.func.sh b/.rc.func.sh index 8117b7b..64df541 100644 --- a/.rc.func.sh +++ b/.rc.func.sh @@ -102,3 +102,9 @@ function switchpy() { fi done } + +function gitarchive() { + first=`git log -1 --pretty=oneline | cut -d ' ' -f 1 | tail -n 1` + second=`git log -2 --pretty=oneline | cut -d ' ' -f 1 | tail -n 1` + git archive -o $1 $first $(git diff --name-only $second $first) +}