Skip to content

Instantly share code, notes, and snippets.

@CharlieEtienne
Created March 13, 2019 07:49
Show Gist options
  • Save CharlieEtienne/e5423a42fea75d3f170bf7d4b098114e to your computer and use it in GitHub Desktop.
Save CharlieEtienne/e5423a42fea75d3f170bf7d4b098114e to your computer and use it in GitHub Desktop.
Git config with two remote repositories (GitHub + Remote server)
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
[remote "origin"]
url = ssh://username@ssh.server_adress:22/home/username/git/myproject.git
fetch = +refs/heads/*:refs/remotes/origin/*
[remote "github"]
url = git@github.com:UserName/myproject
fetch = +refs/heads/*:refs/remotes/github/*
[remote "all"]
url = ssh://username@ssh.server_adress:22/home/username/git/myproject.git
pushurl = ssh://username@ssh.server_adress:22/home/username/git/myproject.git
pushurl = git@github.com:UserName/myproject
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
[branch "dev"]
remote = origin
merge = refs/heads/dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment