Skip to content

Instantly share code, notes, and snippets.

@jleclanche
Created May 1, 2014 18:16
Show Gist options
  • Save jleclanche/24cabd569f09cb06acc6 to your computer and use it in GitHub Desktop.
Save jleclanche/24cabd569f09cb06acc6 to your computer and use it in GitHub Desktop.
Update tags to match their commit time
#!/bin/zsh
for tag in $(git tag); do
export GIT_AUTHOR_DATE="$(git log -1 --pretty=%ct $tag)"
export GIT_COMMITTER_DATE=$GIT_AUTHOR_DATE
git tag -fam "Release v$tag" $tag $tag
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment