change user in git code example
Example 1: Change Git commit user name and author
git commit --amend --author="Author Name <[email protected]>"
git rebase -i B
git rebase -i --root
git commit --amend --author="Author Name <[email protected]>"
git rebase --continue
git commit --amend --author="Author Name <[email protected]>"
git rebase --continue
git push -f
Example 2: change user in git repository
git config user.email "[email protected]"
git config user.name "Your Name"
git config user.password "your password"
Example 3: change user in git repository
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
git config --global user.password "your password"