0

Unknow user's commit

Hello, I have created a repo in vscode and linked my local repo with github and whenever i commit in my project and push those commits to github, it shows someone with name pp123456 have commited, but not my github username. Why is this happening ? pls help me. My github username is Crystal-99. If you see in my profile , whatever repos are present all are commited by this pp123456 but not Crystal-99. Please help.

Gaël J
  • 11,274
  • 4
  • 17
  • 32
Heatblast
  • 55
  • 6
  • Have you looked at your Git name in your local configuration? – Gaël J Jul 30 '21 at 10:59
  • you mean we see with the command git config --global user.name ? , yeah i checked that and it isnt this. – Heatblast Jul 30 '21 at 11:08
  • Also check local (not global) config: `git config user.name`. – Vadik Sirekanyan Jul 30 '21 at 11:12
  • even the local or global names are not this name. What to do? – Heatblast Jul 30 '21 at 11:34
  • https://docs.github.com/en/github/committing-changes-to-your-project/troubleshooting-commits/why-are-my-commits-linked-to-the-wrong-user – torek Jul 31 '21 at 01:07
  • I have cloned two your repositories. The [first](https://github.com/Crystal-99/New/commits) one has commits authored by `Author: Rahul `. The [second](https://github.com/Crystal-99/Product_sale/commits) one has author `sai_rahul `. Github show username based on email, check `git config user.email`. – Vadik Sirekanyan Jul 31 '21 at 01:42

2 Answers2

1

Github shows username based on author's email. Check both local and global emails:

git config --global user.email
git config --local user.email

I've checked your repositories on Github, the email addresses are different for different repositories.

To set new local values:

git config --local user.name "your name here"
git config --local user.email "your email here"
Vadik Sirekanyan
  • 3,332
  • 1
  • 22
  • 29
0

You can also edit your git user name in .gitconfig file.

You can find the file in : C:\Users\Your_User --> .gitconfig file change your name and email id and save it.

yamini
  • 1
  • 1