Git主要コマンド一覧

ファイル更新: 2026-06-18 行数: 23 列数: 4
更新履歴(1回)
  • 2026-06-18T11:03:05+09:00 / 23行 / ?????????
操作
元CSVをダウンロード
列表示ON/OFF
読み込み中...
command purpose_ja example category
git init リポジトリを新規作成する git init セットアップ
git clone リモートを複製する git clone <url> セットアップ
git add 変更をステージする git add . 記録
git status 作業ツリーの状態を見る git status 確認
git commit ステージ内容を記録する git commit -m "msg" 記録
git log コミット履歴を見る git log --oneline 確認
git diff 差分を表示する git diff 確認
git show コミットの詳細を見る git show <hash> 確認
git branch ブランチを一覧/作成する git branch feature ブランチ
git switch ブランチを切り替える git switch main ブランチ
git checkout 切替や復元を行う git checkout <branch> ブランチ
git merge ブランチを統合する git merge feature 統合
git rebase 履歴を付け替える git rebase main 統合
git restore 作業ツリーを復元する git restore <file> 取り消し
git reset インデックスやHEADを戻す git reset --hard 取り消し
git revert 打ち消しコミットを作る git revert <hash> 取り消し
git stash 変更を一時退避する git stash 退避
git tag タグを付ける git tag v1.0.0 リリース
git fetch リモートの更新を取得する git fetch origin 同期
git pull 取得して統合する git pull 同期