I want to use git with Visual Studio project. I already had a personal account which worked fine. Now my employer gave me a new account and visual studio is still trying to push to my personal account and gives me error on publish and syncs.
So i followed this tutorial:https://code.tutsplus.com/tutorials/quick-tip-how-to-work-with-github-and-multiple-accounts--net-22574
- created new ssh key
- created an identity to it
- added that ssh key to my github account
- added identity to ssh config
Now some of the things i am unclear about
i have created 2 origins + the default one which are origin (default) myorigin (not used) georigin (path:git@github-ge:ge/geweb)
when i type $ git config --global -l it gives me my correct(employer's) user.name and user.email
geweb is the name of my new repository the url of my repository is:https://github.com/ge/geweb.git
when i try pushing to georigin it says repository not found when i try pushing to origin it says error: src refspec master does not match any.
also, no where have i mentioned my second git account's username and password
also, i have 2 emails in my git account user.email in config is not the primary one. could that be the reason?
i am quiet confused at how it works end-to-end.
After failing to push i tried to unbind the project from source and deleted .git files from my project folder but team explorer is still showing unsynced commits and changes
the output of git remote -v is:
- myorigin git@github-ge:ge:getWeb.git (fetch)
- myorigin git@github-ge:ge:geWeb.git (push)