I have 2 accounts on GitHub.
I want to be able to push particular projects to repositories of one account and some to another GitHub account.
How to make it happen?
I am on Mac OS.
I have 2 accounts on GitHub.
I want to be able to push particular projects to repositories of one account and some to another GitHub account.
How to make it happen?
I am on Mac OS.
2
Answers
This article https://linuxize.com/post/how-to-configure-git-username-and-email/ helped me solve this problem. Answering to my own question after a while.
Helpful Extracts from the article:
That is it! Now if you make any commits and changes, it will be held under the specified name and email.
Please generate a ssh key for your mac machine following github official doc https://docs.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent
Then add it in your both github accounts. Then clone your repository using ssh.
After that when you push your code in your remote repository, your code will be pushed specific account repository.