Skip to content

Instantly share code, notes, and snippets.

@ADIX7
Created July 29, 2019 17:07
Show Gist options
  • Save ADIX7/eb5e6c2e145e885ad935108e30cb27fa to your computer and use it in GitHub Desktop.
Save ADIX7/eb5e6c2e145e885ad935108e30cb27fa to your computer and use it in GitHub Desktop.
Synced Git workspaces config

Participants:

  • origin: Main repository. This is a remote repository.
  • work1: Main working repository.
  • mirror: The 'sync' repository between work1 and work2. This is a bare repository with no remotes. It is accessible from work1 and work2
  • work2: The secondary working repository.
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
[remote "origin"]
url = ..\\origin.git\\
fetch = +refs/heads/*:refs/remotes/origin/*
[remote "mirror"]
url = ..\\mirror.git\\
fetch = +refs/*:refs/*
fetch = +tags/*:tags/*
skipDefaultUpdate = true
skipFetchAll = true
[branch "master"]
remote = origin
merge = refs/heads/master
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
[remote "mirror"]
url = ..\\mirror.git\\
fetch = +refs/*:refs/*
mirror = true
[remote]
pushDefault = mirror
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment