Last active
September 13, 2015 21:06
-
-
Save emileber/9c5fd559e7669e32a9f9 to your computer and use it in GitHub Desktop.
Creates a zip archive named `YYY-MM-DD_update.zip` including only changed files using git from specified commit-id relative to the current directory.
This file contains hidden or 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
@echo off | |
setlocal enabledelayedexpansion | |
git diff --name-only --relative %1^^ | |
set SAVESTAMP=%DATE:/=-% | |
set output= | |
for /f "delims=" %%a in ('git diff --name-only --relative %1^^') do ( set output=!output! "%%a" ) | |
git archive -o %SAVESTAMP%_update.zip HEAD %output% | |
endlocal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment