Imagine two friends writing a story separately on different pages. When they put their pages together, why does git merge combine their work?
Think about how git keeps track of changes from different sources.
Git merge creates a new snapshot that combines changes from both branches, preserving all work.
What is the output of the command git merge feature when the feature branch has new commits that do not conflict with the current branch?
git merge featureThink about what happens when the merge can be done without conflicts.
When the feature branch has new commits and no conflicts, git performs a fast-forward merge and shows the update range.
You run git merge feature and get a conflict message. What is the correct next step to combine work?
git merge featureConflicts need manual fixing before completing the merge.
You must fix conflicts in files, stage them with git add, then commit to complete the merge.
You have branches dev, feature1, and feature2. To combine work from both features into dev, which sequence is correct?
Start by switching to the target branch before merging others.
You must checkout the target branch first, then merge feature branches one by one, then push.
Why is it better to use git merge to combine work instead of manually copying files and committing?
Think about how git helps keep track of who changed what and when.
Git merge keeps the history of changes and contributors, making collaboration clear and traceable.