docs:site5:git

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revisionBoth sides next revision
docs:site5:git [2010/04/10 10:45] billhdocs:site5:git [2010/04/10 11:08] billh
Line 5: Line 5:
   * ssh into your account   * ssh into your account
   * create a new folder to hold your repo<code>   * create a new folder to hold your repo<code>
-mkdir /var/git/myapp.git && cd /var/git/myapp.git+mkdir public_html/git/path/to/repo.git && cd public_html/git/path/to/repo.git
 </code> </code>
   * create a new "bare" repo<code>   * create a new "bare" repo<code>
 git init --bare git init --bare
- +</code> 
-or if multiple users will be pushing to this... +    if multiple users will be pushing to this...<code>
 git init --bare shared=group git init --bare shared=group
 </code> </code>
-  * exit from your ssh connection +  * since this will be served over http, you need to set up a post commit hook for [[update-server-info]] to run or else the public will not be able to clone your repo; if all users were using git:// or ssh://, this wouldn't be necessary 
-  * cd into your local project, add the remote, and push<code> +  * exit from your remote ssh connection 
-git remote add origin ssh://myserver.com/var/git/myapp.git +  * cd into your local project, and add the remote<code> 
 +git remote add origin remoteuser@remotehost.com:public_html/git/path/to/repo.git 
 +</code> 
 +    * ::!:: I'm not sure why, but specifying this with ssh:// protocol did not work, but leaving it off works fine 
 +  * push your local master to the remote repo<code>
 git push origin master git push origin master
 </code> </code>
   * if you want this to be known as something other than origin, change origin as desired   * if you want this to be known as something other than origin, change origin as desired
 +  * even though the post commit hook is set up, you should run this once manually inside the remote repo directory<code>
 +git update-server-info
 +</code>
  
-===== developer clone ===== +===== developer user clone =====
-FIXME - this wasn't working yet+
 <code> <code>
-git clone ssh://remoteuser@remotehost.com:path/to/repo.git localdest+git clone remoteuser@remotehost.com:path/to/repo.git localdest
 </code> </code>
  
-===== public clone =====+===== public user clone =====
 Make a subdomain called "git" in SiteAdmin first. Make a subdomain called "git" in SiteAdmin first.
 <code> <code>
Line 34: Line 38:
 </code> </code>
  
 +===== External Links =====
 +  * http://toolmantim.com/thoughts/setting_up_a_new_remote_git_repository
  • docs/site5/git.txt
  • Last modified: 2010/04/10 11:26
  • by billh