Git and GitHub Part -2
Quiz
•
Computers
•
Professional Development
•
Medium
Duccunu Sika
Used 1+ times
FREE Resource
Enhance your content in a minute
34 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
How can you check your current git version?
git --v
git --version
git --option
git --current
Answer explanation
To check your current git version, use the command 'git --version'. This command will display the installed version of git on your system. It is important to note that 'git --v', 'git --option', and 'git --current' are not valid commands to check the git version. Therefore, the correct choice is 'git --version'.
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What command lets you create a connection between a local and remote repository?
git remote add new
git remote add origin
git remote new origin
git remote origin
Answer explanation
To create a connection between a local and remote repository, you can use the 'git remote add origin' command. This command sets up a link between your local repository and a remote repository, allowing you to push and pull changes. It is important to choose the correct option, 'git remote add origin', as it specifies the remote repository's name as 'origin'. This explanation highlights the correct choice without mentioning the option number and refers to the query as a question.
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Describe what these Git commands do to the commit history: git reset --hard HEAD~5 git merge --squash HEAD@{1}
They reset the HEAD to the fifth commit in the repo, then merge to the master branch.
The current branch's HEAD is reset back five commits, then prior commits are squashed into a single commit.
They delete the last five commits.
They merge the last five commits into a new branch.
Answer explanation
The given question asks to describe the effects of two Git commands on the commit history. The first command 'git reset --hard HEAD~5' resets the current branch's HEAD back five commits, discarding any changes made after those commits. The second command 'git merge --squash HEAD@{1}' merges the changes from the previous branch into the current branch as a single commit. Therefore, the correct answer is that the current branch's HEAD is reset back five commits, and the prior commits are squashed into a single commit.
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Your current project has several branches; master, beta, and push-notifications. You've just finished the notification feature in the push-notification branch, and you want to commit it to beta branch. How can you accomplish this?
Checkout the push-notifications branch and run git merge beta
Checkout the master branch and run git merge beta -> push-notifications
Delete the push-notifications branch and it will be committed to the master branch automatically
Checkout the beta branch and run git merge push-notifications
Answer explanation
To commit the notification feature from the push-notifications branch to the beta branch, you need to checkout the beta branch and run 'git merge push-notifications'. This will merge the changes from the push-notifications branch into the beta branch. Make sure to select the correct option that mentions checking out the beta branch and merging with push-notifications.
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which of the following is true when you use the following command? git add -A
All new and updated files are staged
Files are staged in alphabetical order.
All new files are staged
Only updated files are staged
Answer explanation
When you use the command 'git add -A', all new and updated files are staged. This means that any files that have been modified or created will be included in the staging area. The files are not staged in alphabetical order, and it does not matter whether the files are new or updated. The command 'git add -A' stages all new and updated files, regardless of their order or type.
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What will the following command print to the Terminal? git remote -v
A list of remote repositories and their URLs
The current git version you're running
An inline editor for modifying remote repositories
The last 5 git versions you've installed
Answer explanation
The command 'git remote -v' will print a list of remote repositories and their URLs to the Terminal. This command is used to view the remote repositories associated with the current git repository. It is helpful to check the URLs of the remote repositories to ensure that the correct repositories are being accessed and updated during collaboration or synchronization with other developers.
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Looking at the following commands, describe what is happening. git checkout feature-user-location git cherry-pick kj2342134sdf090093f0sdgasdf99sdfo992mmmf9921231
The commit is being tagged for release on the feature-user-location branch
A commit is being copied from its original branch over to the feature-user-location branch
The commit is being cherry-picked as the new HEAD of the commit history
A commit is being copied from the feature-user-location branch to the master branch
The branch is switched to the feature-user-location branch, and the specified commit is applied to the branch
Answer explanation
The given question is asking to describe what is happening with the provided Git commands. The correct choice is 'A commit is being copied from its original branch over to the feature-user-location branch.' This means that a specific commit is being copied from its original branch to the feature-user-location branch. The explanation highlights this choice without mentioning the option number. It also ensures that the explanation doesn't exceed 75 words and replaces 'query' with 'question'.
Create a free account and access millions of resources
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
32 questions
Creating a website | Introduction to CSS
Quiz
•
Professional Development
30 questions
Cyber Security
Quiz
•
Professional Development
30 questions
Quiz - Functions in C
Quiz
•
Professional Development
30 questions
01 - Information Systems - Introduction
Quiz
•
University - Professi...
30 questions
HCI Long Quiz Midterm
Quiz
•
Professional Development
30 questions
HTML Quiz
Quiz
•
Professional Development
33 questions
HTML_Intellipaat
Quiz
•
Professional Development
30 questions
Mathematical Logic
Quiz
•
11th Grade - Professi...
Popular Resources on Wayground
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Order of Operations
Quiz
•
5th Grade
20 questions
Halloween
Quiz
•
5th Grade
16 questions
Halloween
Quiz
•
3rd Grade
12 questions
It's The Great Pumpkin Charlie Brown
Quiz
•
1st - 5th Grade
20 questions
Possessive Nouns
Quiz
•
5th Grade
10 questions
Halloween Traditions and Origins
Interactive video
•
5th - 10th Grade
Discover more resources for Computers
10 questions
Halloween
Quiz
•
Professional Development
16 questions
Spooky Season Quiz
Quiz
•
Professional Development
5 questions
11.4.25 Student Engagement & Discourse
Lesson
•
Professional Development
50 questions
ASL Colors and Clothes
Quiz
•
KG - Professional Dev...
15 questions
Ohms Law
Quiz
•
Professional Development
10 questions
Halloween Trivia
Quiz
•
Professional Development
10 questions
Halloween Trivia
Quiz
•
Professional Development
