D197 ITSW 2110
Version Control
3.0 Credits
Objective Assessment Review (Qns &
Ans)
2025
©2025
, Multiple Choice Questions
Question 1:
A distributed development team uses Git for managing their codebase.
To ensure the integrity of every change, Git generates a unique identifier
for each commit based on its content. Which cryptographic algorithm
does Git traditionally use for this purpose?
A. MD5
B. SHA-1
C. SHA-256
D. CRC32
Correct ANS: B. SHA-1
Rationale:
Git computes a SHA-1 hash from the contents of every commit, along
with metadata such as the commit message, timestamp, and parent
hashes. This cryptographic hash ensures data integrity by detecting any
modifications to the commit content.
---
Question 2:
A data analytics project requires integrating several experimental
features into a stable main branch. The team decides to create isolated
branches for each feature and then merge them into the main branch
once complete. Which branching model does this approach best
represent?
A. Trunk-based development
B. GitFlow branching model
C. Forking workflow
D. Patch-based development
Correct ANS: B. GitFlow branching model
©2025
, Rationale:
The GitFlow branching model is designed for parallel feature
development by isolating work in separate feature branches. It provides
a clear structure for integrating new development with a stable main
branch while also supporting release and hotfix branches.
---
Question 3:
During a code review process, a developer needs to combine multiple
related commits into one before merging into the main branch, thereby
keeping the commit history concise. Which advanced Git technique best
accomplishes this?
A. Fast-forward merge
B. Interactive rebase with squash
C. Octopus merge
D. Cherry-pick
Correct ANS: B. Interactive rebase with squash
Rationale:
Interactive rebasing (using the `-i` flag) allows developers to re-order,
edit, and squash commits together. Squash merging consolidates
multiple related commits into one atomic commit, leading to a cleaner
and more understandable history.
---
Question 4:
A developer accidentally committed sensitive credentials to a public
repository. To remove these credentials from the entire history, which
advanced Git tool is preferred for rewriting repository history?
A. Git stash
B. Git revert
©2025
Version Control
3.0 Credits
Objective Assessment Review (Qns &
Ans)
2025
©2025
, Multiple Choice Questions
Question 1:
A distributed development team uses Git for managing their codebase.
To ensure the integrity of every change, Git generates a unique identifier
for each commit based on its content. Which cryptographic algorithm
does Git traditionally use for this purpose?
A. MD5
B. SHA-1
C. SHA-256
D. CRC32
Correct ANS: B. SHA-1
Rationale:
Git computes a SHA-1 hash from the contents of every commit, along
with metadata such as the commit message, timestamp, and parent
hashes. This cryptographic hash ensures data integrity by detecting any
modifications to the commit content.
---
Question 2:
A data analytics project requires integrating several experimental
features into a stable main branch. The team decides to create isolated
branches for each feature and then merge them into the main branch
once complete. Which branching model does this approach best
represent?
A. Trunk-based development
B. GitFlow branching model
C. Forking workflow
D. Patch-based development
Correct ANS: B. GitFlow branching model
©2025
, Rationale:
The GitFlow branching model is designed for parallel feature
development by isolating work in separate feature branches. It provides
a clear structure for integrating new development with a stable main
branch while also supporting release and hotfix branches.
---
Question 3:
During a code review process, a developer needs to combine multiple
related commits into one before merging into the main branch, thereby
keeping the commit history concise. Which advanced Git technique best
accomplishes this?
A. Fast-forward merge
B. Interactive rebase with squash
C. Octopus merge
D. Cherry-pick
Correct ANS: B. Interactive rebase with squash
Rationale:
Interactive rebasing (using the `-i` flag) allows developers to re-order,
edit, and squash commits together. Squash merging consolidates
multiple related commits into one atomic commit, leading to a cleaner
and more understandable history.
---
Question 4:
A developer accidentally committed sensitive credentials to a public
repository. To remove these credentials from the entire history, which
advanced Git tool is preferred for rewriting repository history?
A. Git stash
B. Git revert
©2025