docs:git:multiple_users_with_a_public_repository

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

docs:git:multiple_users_with_a_public_repository [2009/10/20 23:25] – created billhdocs:git:multiple_users_with_a_public_repository [2010/03/24 12:33] (current) billh
Line 7: Line 7:
  git clone --bare /path/to/myproject sharedfoldername  git clone --bare /path/to/myproject sharedfoldername
 </code> </code>
-  * either (1) set the public repo up as a remote in the personal repo, or (2) remove the original project directory, and clone the new bare repository<code> +  * either (1) set the public repo up as a remote in the personal repo, or (2) remove the original project directory, and clone the new bare repository 
-(1)+ 
 +**(1)** 
 +<code>
 git remote add origin /Volumes/Seagate-1/gitbackup/Autofill/ git remote add origin /Volumes/Seagate-1/gitbackup/Autofill/
 +</code>
 +
 +You also need to tell git you have a master branch, and where to pull from.  Add these to your .gitconfig:<code>
 +[branch "master"]
 +  remote = origin
 +  merge = refs/heads/master
 +</code>
  
-(2)+**(2)** 
 +<code>
 rm -Rf myproject rm -Rf myproject
 git clone /path/to/sharedfoldername myproject git clone /path/to/sharedfoldername myproject
 </code> </code>
   * now use git fetch, git merge, and/or git pull   * now use git fetch, git merge, and/or git pull
  • docs/git/multiple_users_with_a_public_repository.1256102722.txt.gz
  • Last modified: 2009/10/20 23:25
  • by billh