Pages

Tuesday, April 17, 2012

Using multiple git accounts in a machine

Problem statement: I have two git-hub accounts, one I use for office work and the other is for my personal work. As per the git documentation, I am able to configure them on my machine, but I can access only one at a time. What I need is a way to configure both the accounts in same machine.

Problem Solution: So far I don't have any solution to this problem. But, I have found a work around to this problem. And here it is ...
  1. Assumptions: git-account-1, git-account-2
  2. Configure git-account-1 in your machine. Follow the git hub docs.
  3. Login to git-hub using git-account-1
  4. Search for git-account-2
  5. Click user name link
  6. Select the repository
  7. Click on Fork button


  8. By default git-account-1 will get read access to the repository
  9. Login to git-hub using git-account-2
  10. Open the repository link
  11. Click on Admin button
  12. Click Collaborators, Search user and Add

No comments:

Post a Comment