Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save koma5/c090a67ae74faa1a2e0e51610e7abaf0 to your computer and use it in GitHub Desktop.
Save koma5/c090a67ae74faa1a2e0e51610e7abaf0 to your computer and use it in GitHub Desktop.
# make sure user.name and user.email are set correctly this time
# check with
git log --format=fuller
# fix author
git rebase -i --root -x "git commit --amend --author 'John Doe <john.doe@example.org>' -CHEAD"
# fix date of commit to date of authoring
git filter-branch --env-filter '
if [ "$GIT_AUTHOR_DATE" != "$GIT_COMMITTER_DATE" ]; then
export GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"
fi
' --tag-name-filter cat -- --branches --tags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment