コミットのスカッシュとは
【開発環境】
OS:Win11(64ビット)
git version 2.37.3.windows.1
VSCode1.72.2
VSCodeを使って綺麗なコミットログを作る
【準備】
適当にディレクトリ「rebase_test」を作って vscode で開き、適当なファイル「READER.md」を作成した後、4 回ほどコミットします。

・git log

【squashを使ってコミット履歴をスッキリさせる】
コマンドパレットから行う
1.コマンドパレットを開く

2.GitLens: Git Rebase...をクリック

3.mainブランチをクリック

4.Rebaseを行うコミットを選択

5.1st を選択する

6.Rebase方法の選択。今回はgit rebase -i (--interactive)を行いたいのでInteractiveを選ぶ
下図の下側

7.下図のようになる

8.コミットに対してアクションの選択

9.START REBASEをクリック

10.以下のようなタブが開く
任意のコミットメッセージに変更し、Ctrl+W or x をクリックでタブを閉じる

11,Rebaseが実行される

以上
※コメント投稿者のブログIDはブログ作成者のみに通知されます