GUIツール
git gui
でGUIツールが起動する。
設定
git config --global user.name "XXX XXX" git config --global user.email [email protected]
/.gitconfigに保存される。
新規プロジェクト ファイルのあるフォルダで
git init
ファイルを登録する
git add .
コミットする
git commit -m 'message'
差分を表示する
git diff git diff --cached
変更点を自動的にコミットする
git commit -a -m 'message'
作業用エリア作成
git clone /path/to/git/project workproj
作業エリアでの変更(masterブランチでの)をオリジナルにマージする
git pull /path/to/workproj master
タグを付ける
git tag xxxx
タグ情報をpull/push
git pull --tags git push --tags
タグを表示
git tag -l
タグ間の比較
git diff xxx..xxx
現状との比較
git diff xxx..HEAD
ソースをアーカイブ
git archive --format=zip master xxx > src.zip git archive --format=tar master xxx | gip > src.tar.gz