增加git archive

This commit is contained in:
wuqi 2024-05-13 11:15:07 +08:00
parent 5cf3605f68
commit 2bc4a0ded8

View File

@ -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)
}