2

I have installed 'git for window' from https://git-scm.com/download/win.
When I tried to git clone my github repository using http connect, I wasn't asked for authentication and clone the file successfully. However, when I committed and pushed the file and checked it from github web page. It turned that I was committing using my friends' account (But I am actually using my credential to login in github page which popped up during my push command). Why it always showed that the changes are made by my friends' account?
Edit: I have checked the following webpage and erase generic credential stored in my local space:
Remove credentials from Git

Leo Lin
  • 23
  • 3

1 Answers1

0

It turned that I was committing using my friends' account

Your commits have nothing to do with the authentication you provide when pushing.
They have to do with git config user.name and git config user.email: enter the same username/email than the one used in your GitHub account, and your next commits will show up as you (meaning as your GitHub account)
That won't influence your past commits though: see "GitHub help page 'Changing author info'" for that.

Again: user.name and user.email are local configs used when creating commits, and can be completely different from the GitHub account credentials used for pushing.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250