Git & Version Control

Test your knowledge of Git commands, branching strategies, and version control best practices.

10 Questions beginner

Quiz Questions

  1. What command initializes a new Git repository?
    • git start
    • git init
    • git new
    • git create
  2. Which command is used to stage changes for commit?
    • git stage
    • git add
    • git commit
    • git push
  3. What does 'git clone' do?
    • Creates a copy of a repository
    • Merges branches
    • Deletes a repository
    • Updates remote
  4. How do you create a new branch named 'feature'?
    • git new feature
    • git branch feature
    • git checkout feature
    • git create feature
  5. What does 'git pull' do?
    • Uploads changes
    • Downloads and merges changes
    • Creates a branch
    • Shows history
  6. Which command shows the commit history?
    • git history
    • git log
    • git commits
    • git show
  7. What is a 'merge conflict'?
    • When Git crashes
    • When two branches have conflicting changes
    • When remote is unavailable
    • When commit fails
  8. How do you switch to an existing branch named 'develop'?
    • git switch develop
    • git branch develop
    • git move develop
    • git change develop
  9. What does 'git status' show?
    • Commit history
    • Current branch and changes
    • Remote repositories
    • Configuration
  10. How do you undo the last commit while keeping changes?
    • git revert HEAD
    • git reset --soft HEAD~1
    • git undo
    • git rollback
Take this Quiz