Questions: Version Control with Git

4 questions to test your understanding

Score: 0 / 4
Question 1 Multiple Choice

A student edits app.py, which Git already tracks, then runs `git commit -m "fix bug"` without running `git add`. What happens?

AThe edit to app.py is committed, because Git tracks the file
BNo commit is made, because no changes were staged
CGit deletes the edit, because it was not staged
DGit commits an empty file named app.py
Question 2 True / False

Git and GitHub are two names for the same software.

TTrue
FFalse
Question 3 Multiple Choice

When does Git report a merge conflict while merging branch feature into main?

AWhenever both branches contain new commits
BWhenever the two branches touched the same file in any way
CWhen both branches changed the same part of a file in different ways, so Git cannot choose automatically
DOnly when a file was deleted on one branch
Question 4 Short Answer

Why do developers usually create a new branch to build a feature instead of committing directly to the main branch?

Think about your answer, then reveal below.