add前の変更を削除
git restore <file名>
add前の変更内容確認(特定のファイル)
git diff -- <file名>
addの取り消し(特定のファイル)
git rm --cached -r <file名>
add後に変更内容確認(特定のファイル)
git diff --cached <file名>
add[全てのファイル]
git add .
add[特定のファイル]
git add [ファイル名]
ブランチの確認
git branch
ブランチの切替
git checkout ブランチ名
ブランチ作成
git checkout -b 作成するブランチ名
現在のブランチから作成される
ブランチ削除 [マージ済みのみ]
git branch -d [ブランチ名]
ブランチ削除 [マージ前も可]
git branch -D [ブランチ名]
コミット[コメント付き]
git commit -m 'コメント'
直前のコミット取り消し
git revert HEAD
リモートへプッシュ
git push origin リモートブランチ名
リモートから変更内容を取り込む
git pull origin ローカルブランチ名
随時更新していきます。