danBuonocore danBuonocore - 2 years ago 152
Android Question

GitHub on Android Studio

I have a main GitHub account shared by multiple people, and we each have our own account. I created a repository through Android Studio using the main account, and now I was to push code from my personal account. So I go to the GitHub settings under

File > Settings
and change the login credentials to reflect my personal account. However, when I push the code it still says the commit was made by the main account, and that it is the only contributor. What am I doing wrong?

Answer Source

Maybe when you set up git with your new account it didn't change gitconfig


git config --global user.name "Amir"
git config --global user.email "your_email@example.com"

(note --global is optional , it will make it your name/email everywhere on the system)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download