Git設定のメモ.
■Serverに導入
サーバにGitを導入する際,メモを取るのを忘れていたため省略.ググればいくらでも出てくる.
■Client
本来はコマンドによる操作が一番だが,開発機がWindowsのため,ソフトを利用した方が使いやすい.クライアントソフトにはSourseTreeを利用中.パスワード認証ではなく鍵認証方式を利用.
Git、Mercurial 対応 無料 DVCS Mac、Windowsクライアント | Atlassian
■コマンドのメモ
・ベアリポジトリの作成(サーバ)
$ cd git
$ mkdir
$ cd
$ git --bare init --shared
gitのレポジトリのディレクトリ名には.gitを付けるのが慣例らしい.
・ローカルレポジトリの作成
※サーバと同じ端末で作成する場合
$ mkdir
$ cd
$ git init
$ echo "git test" > test.txt
$ git add *
$ git commit -m "first commit"
$ git remote add origin /home//git/
$ git push origin master
・sshの設定は?
$ git remote add origin ssh://
/home/ /git/
・サーバ上にgitのデータがある場合
git clone
@ :/home/ /git/
git add *
git commit -m "Commit message"
git push origin master
- 作者: Jon Loeliger,吉藤英明(監訳),本間雅洋,渡邉健太郎,浜本階生
- 出版社/メーカー: オライリージャパン
- 発売日: 2010/02/19
- メディア: 大型本
- 購入: 7人 クリック: 287回
- この商品を含むブログ (45件) を見る