Difference between revisions of "Git"
From Alessandro's Wiki
Porcelinux (talk | contribs) (Created page with "Once upon a time there was CVS, then Subversion came. Now we switch to Git, another step forward. * [http://www.kernel.org/pub/software/scm/git/docs/git-daemon.html git-daemo...") |
|||
(4 intermediate revisions by 2 users not shown) | |||
Line 5: | Line 5: | ||
** magic file'' git-daemon-export-ok'' | ** magic file'' git-daemon-export-ok'' | ||
** '''/var/git''' | ** '''/var/git''' | ||
http://gitref.org/ | |||
= quick command reference = | |||
* cleaning: | |||
git-gc --prune | |||
== daemon in gentoo == | == daemon in gentoo == | ||
Line 21: | Line 29: | ||
== new repository == | == new repository == | ||
http://tumblr.intranation.com/post/766290565/how-set-up-your-own-private-git-server-linux | |||
http://qugstart.com/blog/ruby-and-rails/create-a-new-git-remote-repository-from-some-local-files-or-local-git-repository/ | |||
* move in repo dir: | * move in repo dir: | ||
Line 35: | Line 47: | ||
* now I want to add to the server my already started php project: | * now I want to add to the server my already started php project: | ||
cd /home/me/php_code | cd /home/me/php_code | ||
== Gitosis == | |||
http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way | |||
..to finish | |||
== Gitorious == | |||
Configure Git | |||
*If you have not done so already, download and install Git | |||
git config --global user.name "Alessandro del Gallo" | |||
git config --global user.email "aledelg@gmail.com" | |||
*Pushing your local repository to Gitorious | |||
git checkout master | |||
git remote add origin git@gitorious.org:mediacutter/mediacutter.git | |||
git push origin master |
Latest revision as of 15:45, 30 August 2012
Once upon a time there was CVS, then Subversion came. Now we switch to Git, another step forward.
- git-daemon
- listening on port 9418.
- magic file git-daemon-export-ok
- /var/git
quick command reference
- cleaning:
git-gc --prune
daemon in gentoo
- system-daemon config file
/etc/conf.d/git-daemon
- default repo dir:
/var/git
- default user:
nobody
- start it
/etc/init.d/git-daemon start
- check (if listening)
netstat -putan|grep git tcp 0 0 0.0.0.0:9418 0.0.0.0:* LISTEN 32012/git-daemon tcp6 0 0 :::9418 :::* LISTEN 32012/git-daemon
new repository
http://tumblr.intranation.com/post/766290565/how-set-up-your-own-private-git-server-linux
- move in repo dir:
cd /var/git
- create directory and initialize repo:
mkdir name_project.git cd name_project.git
git --bare init git config core.sharedrepository 1 git config receive.denyNonFastforwards true find objects -type d -exec chmod 02770 {} \;
- now I want to add to the server my already started php project:
cd /home/me/php_code
Gitosis
http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way
..to finish
Gitorious
Configure Git
- If you have not done so already, download and install Git
git config --global user.name "Alessandro del Gallo" git config --global user.email "aledelg@gmail.com"
- Pushing your local repository to Gitorious
git checkout master git remote add origin git@gitorious.org:mediacutter/mediacutter.git git push origin master