Created
November 19, 2011 15:17
-
-
Save yano3/1378948 to your computer and use it in GitHub Desktop.
git commit --amend --reset-author
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Your name and email address were configured automatically based | |
on your username and hostname. Please check that they are accurate. | |
You can suppress this message by setting them explicitly: | |
git config --global user.name "Your Name" | |
git config --global user.email you@example.com | |
After doing this, you may fix the identity used for this commit with: | |
git commit --amend --reset-author |
I clone a repo from account 1 using account 2, after making some changes, i want to push the changes.
But account 2 was denied by remote account 1. So i config the account 1 as the local setting under working directory and ran the reset-author command. After all this, when i commit. It still use account 2 and was denied.
You can add --no-edit to avoid the editor
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is potentially two
user.name
values set ... One at the--global
config and one on the local repository.If you
git config --list
the output will have multiple of the same parameters ... the last one in the list is the one used for your current repo.