Answer Posted / Rajat Madan
To squash multiple commits into one, you can use the command `git rebase -i <base_branch>`. In the interactive mode, change 'pick' at the beginning of each commit you want to squash to 'squash', then save and exit. To fixup (amend the last commit), use `git rebase -i HEAD~<number_of_commits>` and change 'pick' to 'fixup!'.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers