
Git , GitHub And CLI

Quiz
•
Computers
•
University
•
Medium
Shashwat Mahendra
Used 7+ times
FREE Resource
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.
Create a free account and access millions of resources
Similar Resources on Wayground
25 questions
Git Set Go - Set 1

Quiz
•
University
30 questions
1800 Testing 4 Practice

Quiz
•
University
25 questions
HTML

Quiz
•
5th Grade - Professio...
25 questions
Prueba Diagnóstica de HTML y CSS

Quiz
•
University
30 questions
ETC Long Quiz

Quiz
•
University
25 questions
AITECH_1

Quiz
•
University
30 questions
การออกแบบและพัฒนาเว็บไซต์

Quiz
•
University
35 questions
AZ-400 Quiz

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University