Website Vidya

Cloud & DevOps / EASY

Git and GitHub Practice Quiz: 100 Version Control & Collaboration Questions

Test your version control skills with 100 Git and GitHub practice questions covering branching, commits, merging, rebase, pull requests, and merge conflicts.

100Questions
90mDuration
+1Marks / Q
NoneNegative Marks

Git & GitHub Version Control Comprehensive Practice Exam

Test and refine your source code management expertise with this 100-question Git and GitHub practice quiz. Essential for software developers, DevOps practitioners, and open-source contributors, this assessment evaluates your mastery of distributed version control mechanics, branching models, history manipulation, and collaborative GitHub workflows.

Git Fundamentals & Architecture Evaluated

The questions examine both core plumbing/porcelain commands and collaborative practices:

  • Internal Object Architecture: Git's content-addressable database, SHA-1/SHA-256 object hashing, the four core Git objects (blobs for file contents, trees for directory structures, commits pointing to trees and parents, annotated tags), and how HEAD tracks branch references in .git/refs/.
  • Working Tree, Staging Area & Repository: Moving changes between the three trees using git add (including interactive staging git add -p), git status, git diff (unstaged vs staged with --cached), git commit, and discarding changes safely with git restore.
  • Branching, Merging & Rebase: Fast-forward merges vs 3-way merge commits (--no-ff), linear history creation with git rebase (and interactive rebase git rebase -i for squashing and rewording), cherry-picking commits (git cherry-pick), and resolving complex merge conflicts.
  • Remote Collaboration with GitHub: Cloning repositories, configuring remote tracking branches (git remote add, git branch -u), pushing and pulling (git push, git fetch, git pull --rebase), creating and reviewing Pull Requests (PRs), branch protection rules, and code owners (CODEOWNERS).
  • Undoing Mistakes & History Repair: Amending the most recent commit (git commit --amend), rolling back commits with public safety (git revert), moving branch pointers with git reset (--soft, --mixed, --hard), and recovering lost commits using the reference log (git reflog).
  • Productivity & Stashing: Shelving work in progress with git stash (push, pop, apply, list, drop), finding introducing bugs using binary search (git bisect), line-by-line attribution with git blame, and cleaning untracked files with git clean -fd.

Real Coding Collaboration Scenarios

Questions present common developer pitfalls: resolving accidental commits to main, untracking files already committed without deleting them locally (git rm --cached), and restoring detached HEAD branches without losing work.

Test Structure

Standardized testing rules & scoring benchmarks

Questions 100 multiple-choice questions.
Passing Grade 70% passing threshold.
Explanations Comprehensive technical rationales explaining Git tree states and best practices.
Keep Practicing

Related Quizzes & Challenges

Strengthen your understanding with more interactive technical tests in this domain.

Showing 4 of 8 related tests
Featured Infrastructure PartnerUp to 75% OFF + 3 Months Free

Supercharge Your Linux & Cloud Workloads with Hostinger

Deploy high-speed NVMe KVM VPS, Docker containers, and LiteSpeed-accelerated WordPress servers in under 60 seconds with full root access, dedicated IPv4, and 24/7 technical support.

Pure NVMe SSD StorageFull Root Access & SSHFree Domain & Unlimited SSL99.9% Uptime SLA
Plans from$2.99/mo
Claim Hostinger DealAffiliate link • Special discount applied at checkout