Skip to content

Instantly share code, notes, and snippets.

@arkuznetsov
Last active May 4, 2022 05:53
Show Gist options
  • Save arkuznetsov/e6dcd449e49c8fbdd75702bcdbbadd58 to your computer and use it in GitHub Desktop.
Save arkuznetsov/e6dcd449e49c8fbdd75702bcdbbadd58 to your computer and use it in GitHub Desktop.
git change any commit author
# replace commit (GIT_COMMIT) author/e-mail with GIT_AUTHOR_NAME/GIT_AUTHOR_EMAIL
git filter-branch --env-filter "if [ $GIT_COMMIT = f6f3a903218c4e83f492df637f8341bf1df0b513 ]; then export GIT_AUTHOR_NAME='1c'; export GIT_AUTHOR_EMAIL='1c@1c.ru'; fi"
#purge backup
git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment