Created
March 15, 2018 15:07
-
-
Save thibault-ketterer/a58376a7126518745f9eecb6f224b723 to your computer and use it in GitHub Desktop.
git commit with file date instead of "now"
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
#!/bin/bash | |
for file in *;do | |
dat=$(stat -c %y $file) | |
echo $dat : $file | |
git add $file | |
git commit --date="$dat" $file -m "TK add example $file" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment