
Git , GitHub And CLI
Quiz
•
Computers
•
University
•
Practice Problem
•
Medium
Shashwat Mahendra
Used 7+ times
FREE Resource
Enhance your content in a minute
30 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the command "git init" do?
Initializes a new GitHub repository
Creates a new Git repository in the current directory
Clones an existing repository
Commits changes to the repository
E)None of the above
Answer explanation
git init initializes a new Git repository in the current directory by creating a .git subdirectory that contains all the necessary metadata and object database.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you switch to a different branch?
A) git branch <branch-name>
B) git checkout <branch-name>
C) git switch <branch-name>
D) git jump <branch-name>
Answer explanation
git checkout <branch-name> switches the active branch to the specified branch.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the primary purpose of git clone?
Copying files between branches
Creating a duplicate of a repository from a remote server
Merging branches
Initializing a new repository
E)None of the above
Answer explanation
git clone is used to create a local copy of a remote repository. It downloads the entire repository, including all files, branches, and history.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which command stages changes for the next commit?
git commit
git push
git add
git pull
E)None of the above
Answer explanation
git add stages changes by adding files or changes to the staging area, preparing them to be included in the next commit.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does git status display?
A) The current branch
B) Changes staged, unstaged, and untracked
C) Remote repository status
D) The commit history
E)None of the above
Answer explanation
git status shows the state of the working directory and the staging area, including changes that are staged for commit, unstaged changes, and untracked files.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you view the commit history in Git?
A) git status
B) git log
C) git history
D) git show
E)None of the above
Answer explanation
git log displays the commit history for the current branch, including commit hashes, authors, dates, and commit messages.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of git pull?
A) Uploads local commits to the remote repository
B) Downloads changes and integrates them into the current branch
C) Deletes the current branch
D) Creates a new branch
E)None of the above
Answer explanation
git pull is a combination of git fetch and git merge, which downloads changes from a remote repository and merges them into the current branch.
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?
Similar Resources on Wayground
25 questions
SQL-Basics-SET-1
Quiz
•
University
25 questions
Повторение файлы и устройства ПК 7 класс
Quiz
•
7th Grade - University
25 questions
Essentials of Information Technology(Public College Samana)
Quiz
•
University
25 questions
Профессиональная иностранная терминология_8
Quiz
•
University
25 questions
Kiến thức về hiệu ứng trình chiếu
Quiz
•
9th Grade - University
26 questions
Input and Output devices
Quiz
•
University - Professi...
26 questions
Quiz sobre Pensamiento Computacional
Quiz
•
1st Grade - University
25 questions
Internet
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
