docs:git:multiple_users_with_a_public_repository

multiple users with a public repository

  • start a new project or change to an existing project
  • initialize a personal git repo
  • clone this repo to a bare repo, and move it to a public place
    	git clone --bare /path/to/myproject sharedfoldername
  • 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)

git remote add origin /Volumes/Seagate-1/gitbackup/Autofill/

You also need to tell git you have a master branch, and where to pull from. Add these to your .gitconfig:

[branch "master"]
  remote = origin
  merge = refs/heads/master

(2)

rm -Rf myproject
git clone /path/to/sharedfoldername myproject
  • now use git fetch, git merge, and/or git pull
  • docs/git/multiple_users_with_a_public_repository.txt
  • Last modified: 2010/03/24 12:33
  • by billh