Created
July 18, 2014 08:42
-
-
Save yorkie/0cdb5f26c9f54bb8dda2 to your computer and use it in GitHub Desktop.
how to output the file modify date in git environment
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
### command-line | |
git log posts/example.js | awk '/Date/ { print $2, $3, $4, $5, $6; exit; }' | |
### in script | |
date = `git log posts/example.js | awk '/Date/ { \ | |
print $2, $3, $4, $5, $6; \ | |
exit; \ | |
}'` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment