For multiples machines, with no direct LAN access, GitHub is the right intermediate repos, with WAN access and user ACLs.
The working with remotes GitHub help page will gives you the first commands, to declare your GitHub remote upstream repo, toward which all your downstream repos (on your different machines) will push to/pull from.
On the second machine, you will start with a git clone
.
To grab a full copy of another user’s repo when you do not have a local repo already, you will use git clone URL.
- For public repos, the URL can be a read-only URL like
git://github.com/user/repo.git
or an HTTP read-only URL like http://github.com/user/repo.git
.
- For public repos you own or are a collaborator on, and all private repos, you must use a private ssh url like
git@github.com:user/repo.git
.
That being said, branches should be made to isolate development effort, not to isolate environment-specific text files (like config files).
For the latter (configuration), keeping one branch with:
- a template config file
- a value file (with the values for the different environments)
- a script able to extract the right values and generate the final config file
is a better alternative.