Export files between GIT commits for windows
I wrote a simple batch script to help me export the modified files between two git commits and archive them.
The commits can be branches or commit codes.
1. Please save the following code as gitexport.bat:
::simple script for exporting files between master and a commit that can be a branch ::you should have 7zip installed @echo off chdir %1 git diff --name-only %2 %3 > tmp 7z.exe a ../%3.zip @tmp DEL tmp cd .. echo 'finished'
2. Go one directory before your git repository (in order not to mess your repository in case you forget to remove the exported files).
3. Example usage
gitexport.bat my_directory_name_where_the_git_repository_resides master lastcommitcode