To synchronize both repositories, you must pull the latest changes to your computer whenever you start working on the code.
For this you want to execute
git pull
... which is usually configured to pull from the default remote (source) to the current branch. Git may complain if this is not the case, and therefore a longer version will work:
git pull origin {branch_name}
Note. This is the same process that you would use if two or more people were working on the same repo. Essentially, this is what happens, instead of two different people working in the same repository, you have two different machines working in the same repository.
If you are starting a new one on a new machine, all you have to do is clone the repo first:
git clone {remote_url}
You get this URL from your GitHub repository homepage. This command will create a full working copy of the repo in a subdirectory.
Nick Berardi May 16 '11 at 12:02 a.m. 2011-05-16 00:02
source share