前提†

↑

設定†

↑

運用†

↑

ローカルリポジトリの作成†

↑

リモートリポジトリの作成†

↑

ローカルの内容をリモートに反映†

↑

ローカルに git を導入†

↑

ローカルとリモートの repo の関係付け (一回だけ)†

munakata@muna-E420:~/beamer/keio2012$ git remote add e420  ssh://munakata@mythen.hmuna.com:8822/raid_vol/home/munakata/repos/keio2012.git 
↑

ローカル上の変更をリモートに反映†

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 ブランチを作成して、そのブランチに移動†

↑

git ブランチの削除†

これは以下の2つをまとめて実行したことになる

↑

git の管理対象から外す†

git rm --cached [ファイル名]
↑

git gc†

↑

過去のリビジョンからファイルを復元 (abc123リビジョンにあるhoge.txtを持ってきたいとする)†

git checkout -f abc123 hoge.txt
↑

git tag†

↑

git diff†

↑

git send-email†

↑

git credential helperを使って HTTP越しで 認証がかかっているリポジトリにアクセスする†

↑

SSH 接続でパスワードなしにするには公開鍵をサーバーに登録する†

− サーバーの ~/.ssh に

cat (クライアントの公開鍵)>> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
↑

git 環境変数の設定†

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/*
↑

git 公式サイトマニュアル(日本語)†

↑

逆引き git†


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS