docs:site5:git

Differences

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

Link to this comparison view

Next revision
Previous revision
docs:site5:git [2010/04/10 02:11] – created billhdocs:site5:git [2010/04/10 11:26] (current) billh
Line 1: Line 1:
 ====== git (on Site5) ====== ====== git (on Site5) ======
-FIXME+You need to set up [[ssh_access]] to be able to act as the developer on a project.
  
-===== See Also ===== +====== set up a bare git repo ====== 
-  * [[ssh_access]]+  * ssh into your account 
 +  * create a new folder to hold your repo<code> 
 +mkdir public_html/git/path/to/repo.git && cd public_html/git/path/to/repo.git 
 +</code> 
 +  * create a new "bare" repo<code> 
 +git init --bare 
 +</code> 
 +    * if multiple users will be pushing to this...<code> 
 +git init --bare shared=group 
 +</code> 
 +  * 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 
 +  * exit from your remote ssh connection 
 +  * 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 
 +</code> 
 +  * 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> 
 +  * you may also want to set up [[gitweb]] on your account 
 + 
 +===== developer user clone ===== 
 +<code> 
 +git clone remoteuser@remotehost.com:path/to/repo.git localdest 
 +</code> 
 + 
 +===== public user clone ===== 
 +Make a subdomain called "git" in SiteAdmin first. 
 +<code> 
 +git clone http://git.remotehost.com/Project.git 
 +</code> 
 + 
 +===== External Links ===== 
 +  * http://toolmantim.com/thoughts/setting_up_a_new_remote_git_repository
  • docs/site5/git.1270887091.txt.gz
  • Last modified: 2010/04/10 02:11
  • by billh