Push changes between several local git repos - lifuzu/cafe GitHub Wiki
- Install openssh client and server on each image:
sudo apt-get install openssh-client
sudo apt-get install openssh-server
- Copy public ssh key to your "server" image:
ssh-copy-id <user>@[host|ip]
- Clone the repo from your "server" image:
git clone <user>@[host|ip]:/path/to/the/repo
- If you want to push the change to your "server" image, you need to config (on your 'server' image side):
git config receive.denyCurrentBranch ignore
- Then you can set back the config (on your 'server' image side):
git config receive.denyCurrentBranch refuse
References: