最初
git init
git add -A
git commit -m "first commit"
git remote add origin git@github.com:ユーザー名/リポジトリ名.git
git push origin master
git pull
ユーザー、パスワード保存
git config --global credential.helper store
変更分のみ
git commit -am "commit updated files"
git push origin master
git pull
ローカルの変更を取り消したい場合:
rm 変更を取り消したいファイル名
git pull
Discarding local changes (permanently) to a file:
git checkout -- file名
Discard all local changes to all files permanently:
git reset --hard
その他
git status
git log
git branch