gitサーバー構築
技術文書
2015/05/18
[gitサーバー: 49.212.176.26] [admin@server ~]$ cd /home/admin/ [admin@server ~]$ mkdir git [admin@server ~]$ cd git/ [admin@server ~]$ git init --bare x-generation.git [ローカルPC] [user@local ~]$ cd express/x-generation/ [user@local ~]$ git init [user@local ~]$ git remote add origin ssh://admin@49.212.176.26:/home/admin/git/x-generation.git [user@local ~]$ git add [user@local ~]$ git commit -m 'init' [user@local ~]$ git push origin master [gitサーバー: 49.212.176.26] #ドキュメントルートへのフック作成 [admin@server ~]$ vi /home/admin/git/x-generation.git/hooks/post-receive #!/bin/sh cd /var/www/x-generation git --git-dir=.git pull origin master [admin@server ~]$ chmod a+x /home/admin/git/x-generation.git/hooks/post-receive