Science, Technology and Life

Working With Multiple Github Account on a Computer

| Comments

Source control is one of a basic need for software development, especially when we work on a team. Git is one of popular distributed source control. Working with multiple github account on the same computer need a few tricky way. Let’s assume we have cloned the repository from github to local computer. The following ways are the simple ways I got on internet.

Change Remote URL to HTTPS

This way is by changing the remote URL to HTTPS with the following format.

$ git remote set-url origin

Then do normal git operation such as commit, push etc. To ensure that the commits appear as performed by USERNAME, we can configure the username and email on our working directory.

$ git config USERNAME
$ git config

Multiple SSH Key

The other way is by using multiple SSH key. Here is the complete tutorial by Jeffrey Way