- シングルユーザー、 マルチユース
- ssh により多拠点リモートユース
- 複数のマシンで、別々の場所からから接続する
- gitweb を利用する
- 文書ファイル (tex など) の来歴管理を行なう
- サーバー設定情報の管理も行なう
- 基本的に ubuntu の標準に従う (ファイルの置き場所など)
運用 munakata@mythen:~/repos$ [#od4b4933]†
ローカルリポジトリの作成†
- git init
- git add
- git commit -am "comments"
リモートリポジトリの作成†
ローカルの内容をリモートに反映†
- git remote add [local_repo 名] ssh://munakata@mythen.hmuna.com:8822/raid_vol/home/munakata/repos/REPO_NAME
- git push [local_repo 名] master
ローカルに git を導入†
- 共通環境の設定
munakata@muna-E420:~/beamer/keio2012$ git config --global user.email public_mail@hmuna.com
munakata@muna-E420:~/beamer/keio2012$ git config --global user.name "hisao munakata"
- git local repo の設定と、変更のローカルコミット
munakata@muna-E420:~/beamer/keio2012$ git init
Reinitialized existing Git repository in /home/munakata/beamer/keio2012/.git/
munakata@muna-E420:~/beamer/keio2012$ git add *
ローカルとリモートの repo の関係付け (一回だけ)†
munakata@muna-E420:~/beamer/keio2012$ git remote add e420 ssh://munakata@mythen.hmuna.com:8822/raid_vol/home/munakata/repos/keio2012.git
- 上記で e420 はローカル repo を区別するための名前付け、git push で利用する
- 下記の例では repo 自体は master → master の対応である
ローカル上の変更をリモートに反映†
munakata@muna-E420:~/beamer/keio2012$ git push e420 master
munakata@mythen.hmuna.com's password:
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 337 bytes, done.
Total 3 (delta 2), reused 0 (delta 0)
To ssh://munakata@mythen.hmuna.com:8822/raid_vol/home/munakata/repos/keio2012.git
462fe87..7a936a0 master -> master
- git tag -a <タグ名> -m "メッセージ"
- git push --tags
- git checkout -b 1.6 refs/tags/v1.6 (tag を指定してブランチにチェックアウト)
munakata@mythen:~/My_presentations/als2013JP$ git config -l
color.ui=auto
user.name=hisao munakata
user.email=public_mail@hmuna.com
core.quotepath=false
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
remote.origin.url=ssh://munakata@mythen.hmuna.com:8822/raid_vol/home/munakata/repos/als2013JP
branch.master.remote=origin
branch.master.merge=refs/heads/master
remote.mythen.url=ssh://munakata@mythen.hmuna.com:8822/raid_vol/home/munakata/repos/als2013JP
remote.mythen.fetch=+refs/heads/*:refs/remotes/mythen/*