
Git & GitHub Quiz 2 Codingnest
Authored by Coding Nest
Computers
Professional Development
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
12 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the command to initialize a new Git repository?
git start
git new
git create
git init
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which command is used to stage all changes in the working directory for the next commit?
git add .
git push origin master
git stage .
git commit -m 'message'
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the command to create a new branch in Git?
git checkout -b
git commit -m
git branch
git add
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you clone a repository from GitHub to your local machine?
git pull
git commit
git add
git clone
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What command is used to view the commit history in Git?
git status
git history
git show
git log
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of 'git pull' command?
To delete all local changes and update the remote repository
To fetch and download content from a remote repository and immediately update the local repository to match that content.
To merge changes from the local repository to the remote repository
To create a new branch in the local repository
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the command to discard changes in the working directory in Git?
git commit -m 'Discard changes'
git checkout -- .
git revert HEAD
git reset --hard
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?