Git & Version Control
Test your knowledge of Git commands, branching strategies, and version control best practices.
10 Questions
beginner
Quiz Questions
-
What command initializes a new Git repository?
-
git start
-
git init
-
git new
-
git create
-
Which command is used to stage changes for commit?
-
git stage
-
git add
-
git commit
-
git push
-
What does 'git clone' do?
-
Creates a copy of a repository
-
Merges branches
-
Deletes a repository
-
Updates remote
-
How do you create a new branch named 'feature'?
-
git new feature
-
git branch feature
-
git checkout feature
-
git create feature
-
What does 'git pull' do?
-
Uploads changes
-
Downloads and merges changes
-
Creates a branch
-
Shows history
-
Which command shows the commit history?
-
git history
-
git log
-
git commits
-
git show
-
What is a 'merge conflict'?
-
When Git crashes
-
When two branches have conflicting changes
-
When remote is unavailable
-
When commit fails
-
How do you switch to an existing branch named 'develop'?
-
git switch develop
-
git branch develop
-
git move develop
-
git change develop
-
What does 'git status' show?
-
Commit history
-
Current branch and changes
-
Remote repositories
-
Configuration
-
How do you undo the last commit while keeping changes?
-
git revert HEAD
-
git reset --soft HEAD~1
-
git undo
-
git rollback