I have two computers from which I want to contribute to one github repo. How can I accomplish this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To keep both repositories in sync you should to pull the latest changes to your machine whenever you start working on the code.
To do this you want to execute
…which is usually set up to pull from the default remote (origin) to your current branch. Git might complain if this isn’t the case, and so the longer version will work as well:
Note: this is the same process that you would use if two or more people were working on the same repo. Which is essentially what is happening, instead of two different people working on the same repository, you have two different machines working on the same repository.
If you are starting out fresh on a new machine all you need to do is clone the repo to it first:
You get this url from your GitHub repo’s home page. This command will make a complete working copy of the repo in a subdirectory.