Git学習の備忘録兼、チートシートのようなもの
Gitコマンド
git branch
ブランチを確認する
Gitコマンド
git branch <branch名>
ブランチを作成する
Gitコマンド
git checkout <branch名>
ブランチを移動する
Gitコマンド
git branch -m <変更前のbranch名> <変更後のbranch名>
ブランチ名を変更する
Gitコマンド
git branch -d <branch名>
ブランチを削除する
Gitコマンド
git checkout -b <branch名>
ブランチを作成して、作成したブランチに切り替える
Gitコマンド
git add <変更したファイル>
変更したファイルをstaging areaに追加します。
Gitコマンド
git commit -m "<message>"
stading areaの変更をコミットする
Gitコマンド
git merge <マージするブランチ>
変更したブランチを、今いるブランチにマージすることができる。
Gitコマンド
git diff <branch名> <branch名>
ブランチ間の差分を確認する