LoginSignup
6
9

More than 5 years have passed since last update.

【素手でも】git さーばー起動【カンタン】

Last updated at Posted at 2014-09-29

gitサーバ立ててから、bareリポジトリを素手で作成するまでのメモ。

--
bareリポジトリは /opt/git/ 以下に作成するとします。

git-daemonを起動

git daemon --enable=receive-pack --reuseaddr --base-path=/opt/git/ /opt/git/ --verbose &

/opt/gitにbareリポジトリの作成

cd /opt/git

mkdir sandbox.git

cd sandbox.git

git --bare init

export-okを作成

cd /opt/git/sandbox.git

touch git-daemon-export-ok

この時点で問題ない筈。
以下、/home/someone/tmpで

テスト

cd /home/someone/tmp

git clone git://localhost/sandbox.git

適当に編集してから・・・

remote追加

git remote add orgin git://localhost/sandbox.git

最後にPushテスト。

git push -u orgin master

わーい。

6
9
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
9