A clean Git history is often maintained by using _______ to combine commits before merging.

  • git squash
  • git merge --squash
  • git combine
  • git rebase -i
The correct option is git rebase -i. Interactive rebase (-i) allows you to combine, edit, or reorder commits interactively. Squashing commits during interactive rebase helps create a cleaner and more organized Git history before merging into the main branch.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *