I am using Visual Studio 2022 to publish a new repo to Github. I have two Github accounts. Let's say user1 and user2. user1 is my main account. user2 is mainly for testing purposes.
In VS, I use user1 Github account to publish. The repo is now in user1's Github account. However I am surprised to see user1 and user2 as the contributors. Why did Github add user2? How does Github know they are both mine? The two accounts shouldn't be related in any way.
So I go and delete user2 account from Github and repeat everything again. I don't see two contributors anymore but I still see that 'user2 Add project' in the Code web page. Again, why is Github mentioning user2 again? user2 is deleted now.
I do a text search on the repo files on my machine and noticed 'user2' in 3 files under the '.git' folder. A 'HEAD' file and two 'master' files. It seems the culprit is Visual Studio or Git on my machine?
I deleted the .git folder several times and repeated the process. Deleted github cookies from Chrome thinking it's related.
My question is.. Where is Visual Studio or Git picking 'user2' from and why it's using it to publish? It seems it's using user1 to know the target repo but not who published it.