Free Practice Quiz Question List

4 Version Control and Team Collaboration Online Quiz Questions

Use this free practice quiz with 20 questions to review 4 Version Control and Team Collaboration, test your knowledge, and prepare for your next test or exam.

20 questions
01
True or false
1 point

A teammate clones a Git repository and can inspect its existing commit history before connecting to the shared remote. True or false?

  1. A

    True

  2. B

    False

02
Choose one
1 point

A developer has edited three files but wants the next commit to include changes from only one of them. Which Git area lets the developer select those changes?

  1. A

    The remote

  2. B

    The staging area

  3. C

    The commit history

  4. D

    The main branch

03
Written response
1 point

A developer has made local commits and wants to send them to the shared remote repository. What Git command should the developer use?

04
Fill in the blank
1 point

In Git, a movable name for a line of development is a .

05
True or false
1 point

A Git merge conflict necessarily proves that at least one contributor made a mistake. True or false?

  1. A

    True

  2. B

    False

06
Choose one
1 point

A developer wants teammates to inspect a branch’s changes, discuss them, and request revisions before integration. Which tool or collaboration mechanism best fits this purpose?

  1. A

    A merge conflict: it automatically fixes overlapping edits between branches.

  2. B

    A remote: it replaces the repository’s commit history with a summary.

  3. C

    A pull request: it proposes merging a branch and provides a place to review and discuss the change.

  4. D

    A branch: it prevents contributors from changing the branch after review begins.

07
Choose all
1 point

A teammate is preparing several commits for a shared project. Select all practices that make the commits easier for others to understand and review.

  1. A

    Keep a commit focused on a coherent change.

  2. B

    Combine unrelated changes into one large commit whenever possible.

  3. C

    Use a clear message to describe the change.

  4. D

    Leave the purpose of each commit unexplained so reviewers can infer it.

08
Fill in the blank
1 point

If the histories have not diverged, Git may move the target branch pointer without creating a merge commit. This is called a merge.

09
Written response
1 point

A contributor wants to obtain updates from a remote repository. What Git command should they use?

10
Choose one
1 point

Two branches have each gained new commits since they diverged. What may Git do when merging one branch into the other?

  1. A

    Git always discards the target branch's commits.

  2. B

    Git combines the histories and may create a merge commit.

  3. C

    Git automatically chooses one branch and deletes the other.

  4. D

    Git cannot merge branches once both have new commits.

11
Choose all
1 point

A merge reports overlapping edits in a file. Select all steps that are appropriate for resolving the conflict before completing the merge.

  1. A

    Inspect the competing versions of the edits.

  2. B

    Decide what the combined result should be.

  3. C

    Assume the newest edit is correct and discard the other without review.

  4. D

    Remove conflict markers and run relevant checks before completing the merge.

12
Open ended
1 point

A developer makes a focused fix on a separate branch. The team requests a revision during review, and a merge conflict appears before integration. Describe the steps the developer should take from preparing the branch through completing the merge.

13
Choose one
1 point

At the start of the example workflow, a developer needs to update the local copy of the main branch. Which command sequence does the workflow use?

  1. A

    Run git push, then git switch main.

  2. B

    Run git commit, then git fetch.

  3. C

    Run git switch main, then git pull.

  4. D

    Run git merge, then git add.

14
True or false
1 point

Every team must use the same branch-naming rules, required reviews, automated checks, and merge style. True or false?

  1. A

    True

  2. B

    False

15
Choose one
1 point

You have edited two files, but only one file’s change is ready to record. Which Git area lets you select that change for the next commit?

  1. A

    The working tree: it records every change automatically in a commit.

  2. B

    The staging area: it lets you select which changes to include in the next commit.

  3. C

    The remote: it combines two branches.

  4. D

    The commit: it downloads changes from a remote repository.

16
Written response
1 point

Which Git command obtains updates from a remote repository?

17
Choose one
1 point

A developer is starting a focused bug fix and wants to keep the main branch undisturbed while working. What should they do?

  1. A

    Edit directly on the remote repository's main branch

  2. B

    Create a merge conflict intentionally

  3. C

    Create a short-lived branch for the feature

  4. D

    Delete the main branch and recreate it later

18
Written response
1 point

What is the name for a proposal to merge one branch into another that provides a place for discussion and review?

19
Choose one
1 point

Two teams use different approval requirements and merge styles. Which conclusion is consistent with the described collaboration practices?

  1. A

    Every team must use the same approval count and merge style

  2. B

    Different teams can set different review and merge policies

  3. C

    Git requires every branch name to follow one fixed pattern

  4. D

    Automated checks are prohibited if a team requires review

20
Choose one
1 point

Which statement best explains why a Git clone can provide access to a repository's history locally?

  1. A

    Each clone contains the repository's history

  2. B

    A clone contains only the latest file versions and no history

  3. C

    A repository's history exists only on its remote

  4. D

    Every commit must be made directly on the shared remote