0

I'm working with a company user on github, but I also have a personal account. I connected to github with my company user, clone the repo work on it and later push the commits, but the commits was saved with my personal account and not the company username.

When i connect to github, the console request the email and password i connect with my company credentials also.

I tried setting the global.email and user without results.

How can i change the user ?

jircdeveloper
  • 424
  • 2
  • 17
  • You'll probably have to go back and change the author of the commits you already made. See http://stackoverflow.com/questions/750172/change-the-author-and-committer-name-and-e-mail-of-multiple-commits-in-git – whaleberg Dec 05 '16 at 22:51

1 Answers1

0

Use these commands to log out,

git config --global --unset user.name
git config --global --unset user.email

Then, log in using

git config --global user.name "YOUR NAME"
git config --global user.email "YOUR EMAIL ADDRESS"

Then authenticate with GitHub.


When this is done, as mentioned in the comments by @whaleberg, you will want to change the author of the old commits.

If you follow these steps and still have the issue, let me know and I will try to help.

Community
  • 1
  • 1
tehp
  • 5,018
  • 1
  • 24
  • 31