You can go back and fix all your commits with a single call to git filter-branch. This has the same effect as rebase, but you only need to do one command to fix all your history, instead of fixing each commit individually.
You can fix all the wrong emails with this command:
git filter-branch --env-filter '
oldname="(old name)"
oldemail="(old email)"
newname="(new name)"
newemail="(new email)"
[ "$GIT_AUTHOR_EMAIL"="$oldemail" ] && GIT_AUTHOR_EMAIL="$newemail"
[ "$GIT_COMMITTER_EMAIL"="$oldemail" ] && GIT_COMMITTER_EMAIL="$newemail"
[ "$GIT_AUTHOR_NAME"="$oldname" ] && GIT_AUTHOR_NAME="$newname"
[ "$GIT_COMMITTER_NAME"="$oldname" ] && GIT_COMMITTER_NAME="$newname"
' HEAD
More information is available from the git docs
Related Posts:
- How do I delete a Git branch locally and remotely?
- How do I rename a local Git branch?
- What does cherry-picking a commit with Git mean?
- How do I undo the most recent local commits in Git?
- Undo a Git merge that hasn’t been pushed yet
- fatal: Not a git repository (or any of the parent directories): .git [duplicate]
- Git refusing to merge unrelated histories on rebase
- What is the difference between git push origin and git push origin master
- Git pushing to remote branch
- git – remote add origin vs remote set-url origin
- How do I undo ‘git add’ before commit?
- Git: Message ‘src refspec master does not match any’ when pushing commits in Git
- How can I see the differences between two branches?
- How to upgrade Git on Windows to the latest version
- How do I push a new local branch to a remote Git repository and track it too?
- git: fatal: Could not read from remote repository
- Windows git “warning: LF will be replaced by CRLF”, is that warning tail backward?
- What does “Changes not staged for commit” mean
- How to change the URI (URL) for a remote Git repository?
- What would I use git-worktree for?
- How can I merge multiple commits onto another branch as a single squashed commit?
- Git error when trying to push — pre-receive hook declined
- Why does git say “Pull is not possible because you have unmerged files”?
- Pushing empty commits to remote
- How do I revert all local changes in Git managed project to previous state?
- How do I ignore an error on ‘git pull’ about my local changes would be overwritten by merge?
- How to revert multiple git commits?
- Stash only one file out of multiple files that have changed with Git?
- What is git fast-forwarding? [duplicate]
- The following untracked working tree files would be overwritten by merge, but I don’t care
- fatal: The current branch master has no upstream branch
- You have not concluded your merge (MERGE_HEAD exists)
- How to cherry-pick multiple commits
- git – pulling from specific branch
- What is “origin” in Git?
- How to copy commits from one branch to another?
- Another git process seems to be running in this repository
- How do you stash an untracked file?
- How do I call git diff on the same file between 2 different local branches?
- How to git rebase a branch with the onto command?
- Trying to git pull with error: cannot open .git/FETCH_HEAD: Permission denied
- Remove a git commit which has not been pushed
- Remove a git commit which has not been pushed
- There is no tracking information for the current branch
- How can I make Git “forget” about a file that was tracked, but is now in .gitignore?
- Git push results in “Authentication Failed”
- What are the differences between .gitignore and .gitkeep?
- How to remove files from git staging area?
- What’s the difference between git switch and git checkout
- git – Your branch is ahead of ‘origin/master’ by 1 commit
- What is the point of ‘git submodule init’?
- Git: How to update/checkout a single file from remote origin master?
- Git nothing added to commit but untracked files present – even with those files added to gitignore
- ERROR: Error cloning remote repo ‘origin’
- How can I remove a commit on GitHub?
- What is the difference between ‘git remote update’, ‘git fetch’ and ‘git pull’?
- GitLab remote: HTTP Basic: Access denied and fatal Authentication
- git: How to ignore all present untracked files?
- Move existing, uncommitted work to a new branch in Git
- What are the differences between “git commit” and “git push”?
- What does git push origin HEAD mean?
- Delete branches in Bitbucket
- Your branch is ahead of ‘origin/master’ by 3 commits
- What to gitignore from the .idea folder?git intellij-idea gitignore webstorm
- Why I always Got Error “Push to origin/master was rejected”?
- How to resolve git status “Unmerged paths:”?
- Github Windows ‘Failed to sync this branch’
- How do you clone a Git repository into a specific folder?
- How can I generate a Git patch for a specific commit?
- git checkout master error: the following untracked working tree files would be overwritten by checkout
- How can I unstage my files again after making a local commit?
- Delete forked repo from GitHub
- Push local Git repo to new remote including all branches and tags
- How can I see the changes in a Git commit?
- Git merge without auto commit
- How to get Git to clone into current directory
- Git removing upstream from local repository
- Unlink of file Failed. Should I try again?
- How do you merge two Git repositories?
- Resetting remote to a certain commit
- How to get Git to clone into current directory
- Why is .gitignore not ignoring my files?
- Staging Deleted files
- gerrit – git (pull vs checkout vs cherrypick) which is for what?
- Change the location of the ~ directory in a Windows install of Git Bash
- GIT_DISCOVERY_ACROSS_FILESYSTEM not set
- key_load_public: invalid format
- git fetch doesn’t update my local repository
- Git checkout – switching back to HEAD
- How to create a new branch from a tag?
- I use SourceTree with Git but need to work with SVN repistory, what options do I have?
- GIT and Development URL’s point to production
- Workflow for working with git and WordPress
- best practice on pushing staging development (database/uploads) to the live server
- Could not find wp-load.php issue
- Theme/Plugin/Widget Data and Staging/Production Servers
- SSH git — How to pull a folder from repo, but not delete other directories & files on deployment server [closed]
- how can I create a WP offline environment before releasing the websites? [closed]
- Best workflow for Git theme development with plugins [closed]
- How to retrieve the last modification date of all files in a Git repository