Skip to content

Instantly share code, notes, and snippets.

@yorkie
Created July 18, 2014 08:42
Show Gist options
  • Save yorkie/0cdb5f26c9f54bb8dda2 to your computer and use it in GitHub Desktop.
Save yorkie/0cdb5f26c9f54bb8dda2 to your computer and use it in GitHub Desktop.
how to output the file modify date in git environment
### 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