Last active
August 29, 2015 14:08
-
-
Save ihsanberahim/eef236a3be9abf52329e to your computer and use it in GitHub Desktop.
Export Update base on Commits
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
#you start job at 9AM. U did 5 commits every hour | |
#so can export from latest to the 9am commit id | |
# | |
# | |
#commit_id_5 | |
#commit_id_4 | |
#commit_id_3 | |
#commit_id_2 | |
#commit_id_1 | |
#commit_id_0 (9AM) | |
git diff --name-only $commit_id_3 | |
#^ so this command print all files commited from commit_id_5 to commit_id_3 | |
git diff --name-only $commit_id_1 | |
#^ so this command print all files commited from commit_id_5 to commit_id_1 | |
git diff --name-only $commit_id_1 > updatelist.txt | |
#^ write terminal output to the file named as 'updatelist.txt' | |
zip update.zip $(cat updatelist.txt) | |
#^ zip files in the list | |
# credit - http://ihsanberahim.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment