WorksheetsCloudBinary_Git_Commands_Quiz
Total questions: 15
Worksheet time: 15mins
What command is used to initialize a new Git repository?
git start
git init
git create
git new
How do you add changes to the staging area in Git?
git stage
git add
git commit -a
git update
What command is used to commit changes in Git with a message?
git commit -m "Message"
git save -m "Message"
git push "Message"
git commit-message "Message"
What command is used to view the commit history in Git?
git show
git history
git log
git commits
How do you clone a remote Git repository?
git pull <repository_url>
git copy <repository_url>
git clone <repository_url>
git fetch <repository_url>
What command is used to push changes to a remote repository in Git?
git send
git upload
git push
git commit-push
What Git command is used to check the current status of your repository?
git check
git status
git info
git current
What command is used to fetch changes from a remote repository in Git?
git fetch
git pull
git sync
git download
What command is used to rename a branch in Git?
git rename-branch
git branch-rename
git branch -m
git mv-branch
How do you switch to a different branch in Git?
git switch-branch <branch_name>
git branch-switch <branch_name>
git move <branch_name>
git checkout <branch_name>
What does the command git clone [repository] do?
A) Commits changes to a repository.
B) Creates a new branch.
C) Copies a repository from a remote server.
D) Shows the status of changes.
Which command is used to create a new branch in Git?
A) git merge
B) git branch [branch-name]
C) git checkout
D) git commit
What is the purpose of git commit -m "message"?
A) To change the current branch.
B) To merge branches.
C) To update the remote repository.
D) To record changes to the repository with a message.
How do you update your local repository to match the remote repository in Git?
A) git commit
B) git pull
C) git push
D) git branch
Which command shows the history of commits?
A) git log
B) git status
C) git commit
D) git branch
