-
-
Save arc279/2506153046f288eaf52c15eb5c98f0b6 to your computer and use it in GitHub Desktop.
git管理のファイルのタイムスタンプをコミット日時に修正したい
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 | |
| git ls-tree -rt --name-only HEAD | while read x; do | |
| touch -t $(git log -1 --format=%ci "$x" | jq -r -R '. | strptime("%Y-%m-%d %H:%M:%S %z") | strftime("%Y%m%d%H%M.%S")') "$x" | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment