Skip to content

Instantly share code, notes, and snippets.

@thibault-ketterer
Created March 15, 2018 15:07
Show Gist options
  • Save thibault-ketterer/a58376a7126518745f9eecb6f224b723 to your computer and use it in GitHub Desktop.
Save thibault-ketterer/a58376a7126518745f9eecb6f224b723 to your computer and use it in GitHub Desktop.
git commit with file date instead of "now"
#!/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