最初だけやること
git clone <gitレポジトリのURI> *repositoryに中身がが存在しない場合はmkdir
cd <working directory>
git init
git remote add origin <gitレポジトリのURI>
開発中
git add <file>
git add <file>
...
git commit -m "commit message"
git add <file>
...
git commit -m "commit message"
...
git push origin
こんな時は?
* 変更されたファイルの一覧を確かめたい
git status
* commit履歴を見たい
git log
* 前回のcommitをやり直したい
git commit -m "commit message" --amend
* 前回のcommitを消し去りたい
logで前々回のcommit名を調べる
git reset --soft <前々回のcommit name>
* branchを切りたい
git checkout -b <branch name>
* serverから他の人がpushした内容を受け取りたい
git pull origin
*conflictしたときの解消法はググって
* branchの派生元を変更したい
git rebase <new src branch name>
* 特定のファイルの内容を前回のcommit時のものに戻したい
git checkout HEAD <filename>
* 前回のcommitからの変更点を確認したい
git diff