Squashing By Interactive Mode
Upon entering the above command we’ll get an interactive editor with all our selected commits which is where we’ll be performing squash.
We can see we have selected 3 commits at the beginning of the interactive editor, below that we can see the commands list such as pick, reword, edit, squash, etc. To squash 2nd and 3rd commit with 1st commit, so we’ll change the first word from pick to squash. whichever commits we want to squash we have to change it to squash from pick.
After changing commits from pick to squash save the file and close it, Immediately another editor will be opened where we have to enter the latest commit message. Enter the latest commit message and comment on the remaining old messages.
After adding the latest commit message save the file and exit the file. Now it shows rebasing is successful.
Now if we see our GFG_VIDEO log we can observe our 3 commits after version 1 release are squashed into 1 commit.
Contact Us