0

I am working in a project. Our team is using GitHub for sharing the project.

From my company i have been provided one laptop which was actually used by someone else and he used to push his code in Github. Now onward when i am trying to push my own code it takes his credential by default. Although at the time of pushing my code i have been asked for the credentials and i am giving my credentials too but in Github it is showing that the code is pushed by the previous user. And it is very interesting to know that our team is working in private repo and the prevoius user of my laptop has not access of that repo.

Please someone suggest how to resolve this issue.

I have tried google a lots but not getting exact result. I am using Windows8.1 machine.

I think this one is the bug of Github.

Seki
  • 11,135
  • 7
  • 46
  • 70
Md Noorshid
  • 107
  • 12
  • possible duplicate of http://stackoverflow.com/questions/28238037/git-log-out-user-from-command-line – cahen Jan 26 '17 at 12:23

3 Answers3

4

Reset the git configuration in your machine with:

git config --global --unset-all

Don't unset only name and email because you may still leave behind some leftovers from the previous user.

cahen
  • 15,807
  • 13
  • 47
  • 78
2
git config --global --unset user.name
git config --global --unset user.email

and then set yours

git config --global user.name "your name"
git config --global user.email "your email"
phunsukwangdu
  • 412
  • 5
  • 13
2

You can set your credentials:

git config --global user.name "John Doe"
git config --global user.email johndoe@example.com
wwn
  • 563
  • 5
  • 9