After making several commits, a developer realizes they need to combine these commits into a single commit. What Git process should they follow?

  • Use "git merge" to combine the commits
  • Use "git squash" to merge the commits into a single commit
  • Use "git combine" to merge the commits
  • Use "git rebase" to combine the commits
The correct option is to use "git rebase" to combine the commits into a single commit. Rebase allows the developer to reapply commits on top of another base commit, effectively combining them into a single commit. Squash is used during interactive rebase to merge commits.
Add your answer
Loading...

Leave a comment

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