How to amend several commits in Git to change author -


i have made series of commits in git , realise forgot set user name , user email properties correctly (new machine). have not yet pushed these commits repository, how can correct these commits before (only 3 latest commits on master branch)?

i have been looking @ git reset , git commit -c <id> --reset-author, don't think i'm on right track.

rebase/amend seems inefficient, when have power of filter-branch @ fingertips:

git filter-branch --env-filter 'if [ "$git_author_email" = "incorrect@email" ];      git_author_email=correct@email;      git_author_name="correct name";      git_committer_email=$git_author_email;      git_committer_name="$git_author_name"; fi' -- --all 

(split across lines clarity, not necessary)

be sure inspect result when you're done, make sure didn't change didn't mean to!


Comments

Popular posts from this blog

Delphi Wmi Query on a Remote Machine -