Switched accounts in Github Desktop but commits are showing up as old account #22250
-
I logged out through github desktop from Account A and in with Account B. However I just noticed that commits to my repository owned by Account B are shown as from Account A. How can I fix this so they show from Account B? Is there anyway to retroactively change the owner of the commits? (I’m new to this so I am not sure I am using the terms correctly) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You’ll have to update your author email address, which Github uses to assign commits to an account. You might want to also update your author name to match. Note that you can set these globally, but you can also override the global value for a particular repository, which might be useful if you use different identities for different repositories. Setting your commit email address - GitHub DocsYou can change past commits by rewriting history. Note that this will make things complicated for anyone you have shared the repository with, they will have to manually accept the change. Depending on how many commits you want to change you might either used Git - Rewriting History |
Beta Was this translation helpful? Give feedback.
You’ll have to update your author email address, which Github uses to assign commits to an account. You might want to also update your author name to match. Note that you can set these globally, but you can also override the global value for a particular repository, which might be useful if you use different identities for different repositories.
docs.github.com
Setting your commit email address - GitHub Docs
You can change past commits by rewriting history. Note that this will make things complicated for anyone you have shared the repository with, they will have to manually accept the change. Depending on how many commits you want to change you might either used
git rebase -i
and…