Skip to content

Instantly share code, notes, and snippets.

@ihsanberahim
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ihsanberahim/eef236a3be9abf52329e to your computer and use it in GitHub Desktop.
Save ihsanberahim/eef236a3be9abf52329e to your computer and use it in GitHub Desktop.
Export Update base on Commits
#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