MCQ Detail

Search MCQs, Papers, Topics

AI hard

What Is The Difference Between `Git Rebase` And `Git Merge`?

A. They are identical in functionality
B. `git rebase` rewrites commit history by moving commits on top of another branch, while `git merge` preserves the history
C. `git merge` rewrites history while `git rebase` creates a new branch
D. `git rebase` is used only for remote branches

git merge combines branches while preserving all commit history, creating a merge commit. git rebase rewrites commits by replaying them on top of another branch, creating a linear history without merge commits.

Git Rebase Git Merge Git Version Control Branching
Submitting...

🚀 Found an error or have a suggestion?

Your feedback helps us keep our MCQs accurate and up-to-date.

We appreciate your contribution to improving the quality of our MCQs.

Related MCQs

Related MCQs where subject and topic are same as this mcq

AI easy

Question 1: Which of the following best describes Git?

Git is a distributed version control system used to track code changes.

Git Version Control Software Development Repository
AI easy

Question 2: Which Git command is used to send local commits to a remote repository?

git push uploads local committed changes to a remote repository.

Git Push Repository Version Control
AI medium

Question 3: Which of the following are benefits of version control systems?

Version control helps teams collaborate, track changes, and preserve revision history.

Version Control Git Collaboration History
AI medium

Question 4: What is the purpose of branching in Git?

Branching allows developers to work on new features or fixes without affecting the main code immediately.

Git Branching Development Workflow
AI easy

Question 5: Which Git command is used to download a repository from a remote source for the first time?

git clone is used to copy an existing remote repository to a local machine.

Git Clone Repository Remote