Skip to content

Latest commit

 

History

History
138 lines (114 loc) · 2.51 KB

GitHub Quiz 2.0.md

File metadata and controls

138 lines (114 loc) · 2.51 KB

Activity : GitHub Quiz 2.0

Topic: Git & GitHub

How to participate?

Link to the quiz: https://goo.gl/forms/34KzwE4oWEYpr3bf1

Question 1

How to set up a new local repository?
a. git create <project-name>
b. git new
c. git new <project-name>
d. git init

Question 2

Which command is used to set up email address at the global or user-level?
a. git set --user email <email>
b. git config --global user.email <email>
c. git config email <email>
d. git set --user user.email>email

Question 3

Which command would you run to stage the changes in the js/app.js file? 
a. git add js/app.js
b. git stage js/app.js
c. git commit js/app.js
d. git commit js/app.js --to-staging-area

Question 4

The git status command shows the status of the integrated repository test suite.
a. True
b. False

Question 5

How can you stage only some changes in a file?
a. git stash --patch
b. git add -i
c. git add --patch
d. git add

Question 6

What is the purpose of Git attributes?
a. add metadata to some files or objects
b. specify some settings for particular files or types of files in the repository
c. overwrite global configuration
d. control access permissions for refs

Question 7

What is the use of Git-attributes filters?
a. applying text substitutions on commit/checkout
b. ignoring files based on metadata
c. transforming how the repository is presented in `git status` and `git log`
d. applying text substitutions inside commits received from remotes

Question 8

How can you clean all untracked and ignored files in your working tree?
a. git clean -fd
b. git clean
c. git reset
d. git clean -fdx

Question 9

What does a bare Git repository holds?
a. has contents of .git directory instead of a working tree
b. has no remotes
c. has an empty working tree
d. has .git directory in a separate location from its working tree

Question 10

What is the most effective way to find which particular commit
from some period introduced a bug?
a. git reflog
b. git status
c. git bisect
d. git blame

Answers

  1. (d) git init

  2. (b) git config --global user.email <email>

  3. (a) git add js/app.js

  4. (b) False

  5. (b) git add -i

  6. (b) specify some settings for particular files or types of files in the repository

  7. (a) applying text substitutions on commit/checkout

  8. (d) git clean -fdx

  9. (a) has contents of .git directory instead of a working tree

  10. (c) git bisect