Answer the question
In order to leave comments, you need to log in
Switching Git Users?
I have two GitHub accounts, one for work and one for my projects. How can I quickly switch between GitHub accounts in Visual Code?
I recently reinstalled Windows, and before reinstalling, when I pushed changes, the Login / Password authorization window appeared in Visual Code, I entered the data and it was hurt. This option was perfect for me. But now, after reinstalling Windows, such a window does not appear, but only one account is used. How to make the authorization window appear every time you push?
Answer the question
In order to leave comments, you need to log in
https://gist.github.com/jexchan/2351996
https://gist.github.com/oanhnn/80a89405ab9023894df7
Did similar. All work projects were in a certain folder, personal randomly. Something like that:
- /Projects
- <company-name>
- work-project-1
- work-project-2
- personal-project-1
- personal-project-2
// ~/.gitconfig
[includeIf "gitdir:/Projects/<company-name>/"]
path = ~/.gitconfig-company-name
// ~/.gitconfig-company-name
[user]
email = [email protected]
[core]
sshCommand = "ssh -i ~/.ssh/id_rsa_company_name.pub"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question