Skip to content

Instantly share code, notes, and snippets.

@andreipak
Created March 22, 2017 08:07
Show Gist options
  • Save andreipak/e00566e60d185680e8b56bb53a9201f1 to your computer and use it in GitHub Desktop.
Save andreipak/e00566e60d185680e8b56bb53a9201f1 to your computer and use it in GitHub Desktop.
#!/bin/bash
rev=HEAD
for f in $(git ls-tree -r -t --full-name --name-only "$rev") ; do
touch -d $(git log --pretty=format:%cI -1 "$rev" -- "$f") "$f";
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment