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.
Loading...
Related Quiz
- How does Git enable better handling of changes and revisions in large-scale projects?
- Which Git Hook is triggered before a commit is finalized?
- Customizing the __________ Hook can help enforce coding standards before code is pushed.
- What is a common benefit observed when implementing Git in large projects?
- In what way does integrating Git with an IDE assist in resolving merge conflicts?