ユーザー名とメールアドレスを登録
git config --global user.name "お名前" git config --global user.email "メールアドレス"
Ubuntuだとnanoエディタというものにコミットログが吐出されるのでvimに
git config --global core.editor 'vim -c "set fenc=utf-8"'
diffに色付け
git config --global color.diff auto git config --global color.status auto git config --global color.branch auto
gitの現在設定を確認する
git config --list
バージョン
git —version
リポジトリ作成
git init
ステータスの確認
git status
インデックスに追加
git add <File> git add . -> すべて
コミット
git commit -m コメント(コメントしてコミット)
変更履歴を確認するツール
gitk
コミットされた過去のファイルを復元する
git checkout [commit id] [filename]
最新のコミット内容を表示
git show