git repositryを作成
1 |
git clone ssh://git-server.com/git-path |
ファイルを追加する
1 |
git add hoge.php |
ファイルをコミットする
1 |
git commit hoge.php |
修正分をマスターリポジトリに送る
1 |
git push |
マスターレポジトリからファイルを取得する
1 |
git pull |
ファイルを削除する
1 |
git rm hoge.php |
ディレクトリも削除する
1 |
git rm -r /fuga/ |
コミットログを見る
1 |
git log |
コミットした内容の詳細を見る(showの後はコミットのID)
1 |
git show d211878832f41730dfa0cb3883a8ae73f1b9a152 |
コミットした内容の詳細を見る(ファイル名のみ)
1 |
git show d211878832f41730dfa0cb3883a8ae73f1b9a152 --name-only |
ローカルとコミットされているファイルのdiffを取る
1 |
git diff hoge.php |
ローカルリポジトリの状況を知る
1 |
git status |