All Templates

Git Commands and Workflows

Master Git with questions on branching, merging, rebasing, cherry-picking, and team workflows. Covers everyday commands and advanced version control concepts.

EASY7 questions10 minProgramming

Question Preview

1.What does git rebase do?
Moves or re-applies commits on top of another base commit, creating a linear history
Deletes the current branch and creates a new one
Reverts all commits in the current branch
Pushes local changes to the remote repository
MEDIUMMultiple Choice
2.What is the difference between git fetch and git pull?
git fetch downloads changes without merging; git pull fetches and merges in one step
git fetch pushes changes; git pull downloads them
They are identical commands with different names
git pull only works with GitHub; git fetch works with any remote
EASYMultiple Choice
3.What does git stash do?
Temporarily saves uncommitted changes so you can switch branches and reapply them later
Permanently deletes all uncommitted changes from the working directory
Creates a new branch from the current changes
Pushes changes to a hidden remote branch
EASYMultiple Choice

+ 4 more questions included in the full template