What is the difference between "git merge" and "git rebase"?
- Both commands have the same effect
- Merging preserves the commit history, while rebasing rewrites it
- Merging rewrites the commit history, while rebasing preserves it
- None of the above
The key difference is that "git merge" preserves the commit history by creating a new merge commit, while "git rebase" rewrites the commit history by applying the changes of one branch onto another. Rebase creates a linear, cleaner history but should be used with caution in shared branches.
Loading...
Related Quiz
- In TDD, what is the purpose of a "failing test"?
- In logging, what does the term "log rotation" refer to?
- You're tasked with optimizing a database query that takes a long time to execute. What strategies would you employ to improve its performance?
- In database management, what is cardinality, and how does it impact query optimization?
- How does the concept of abstraction apply in Object-Oriented Programming?