Created
July 14, 2015 11:07
-
-
Save ratik/75aeb9128eb3947cd5cb to your computer and use it in GitHub Desktop.
set date from last commit for files pulled from git
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
#!/usr/bin/env bash | |
last_date=`git log --date=iso | head -n 3 | grep Date | sed 's/.*e: //i'` | |
for changed in `git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD`; | |
do | |
touch $changed -c -d "$last_date" | |
done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment