Push changes between several local git repos - lifuzu/cafe GitHub Wiki

  1. Install openssh client and server on each image:

sudo apt-get install openssh-client
sudo apt-get install openssh-server
  1. Copy public ssh key to your "server" image:

ssh-copy-id <user>@[host|ip]
  1. Clone the repo from your "server" image:

git clone <user>@[host|ip]:/path/to/the/repo
  1. 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
  1. Then you can set back the config (on your 'server' image side):

git config receive.denyCurrentBranch refuse

References:

  1. http://git-scm.com/book/en/Git-on-the-Server-Setting-Up-the-Server
⚠️ **GitHub.com Fallback** ⚠️