Created
July 4, 2022 12:48
-
-
Save gladx/3b75165f2ae74b9becfbc0f6ffb55949 to your computer and use it in GitHub Desktop.
get git update last changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# gitup.sh | |
# gitup.sh HEAD | |
# gitup.sh HEAD~3 | |
if [ ! -z "$1" ] ; then | |
echo "Createing ../update.zip " | |
git diff --name-only "$1" --diff-filter=d | |
git archive -o ../update.zip HEAD $(git diff --name-only "$1" --diff-filter=d) | |
else | |
echo "Createing ../update.zip " | |
git diff --name-only HEAD^ --diff-filter=d | |
git archive -o ../update.zip HEAD $(git diff --name-only HEAD^ --diff-filter=d) | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment