0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Modify ALL history on Git using filter-branch command.

Posted at

This way is recommended for private development.
If you are in team, use more appropriate way.

Have you experienced that your commit is not related to your account on GitHub haven't u?
Yes it's me.

So, I've wrote down here how to solve it.

1. Use filter-branch command

You'd like to change all history(all branches)
$ git filter-branch -f --env-filter "GIT_AUTHOR_NAME='new.name';GIT_COMMITTER_NAME='new.name';GIT_AUTHOR_EMAIL='new.email@mail.com';GIT_COMMITTER_EMAIL='new.email@mail.com'" -- --all

2. Use the force

You need push after modified.

git push -f

Refs

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?