Created
February 9, 2017 11:22
-
-
Save caugner/5b7920a5a2fa25cda2a0d1bf353e2058 to your computer and use it in GitHub Desktop.
A git commit alias to commit at time of last change.
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
#!/bin/bash | |
# cac = commit-at-changetime | |
alias git-cac=git commit --date="$(git ls-files --modified | xargs stat | grep "Modify: " | sort | tail -1 | awk '{gsub("Modify: ", "", $0); print $0}')" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment