Skip to content

Latest commit

 

History

History
76 lines (62 loc) · 1.43 KB

GitHub Quiz 1.0.md

File metadata and controls

76 lines (62 loc) · 1.43 KB

Activity : GitHub Quiz 1.0

Topic: Git & GitHub

How to participate?

Link to the quiz: https://goo.gl/forms/jkZbBhaKUn6VRIED2

Question 1

What's the git command that downloads your repository from GitHub to your computer?
a. git push
b. git fork
c. git clone
d. git commit

Question 2

How do you stage files for a commit?
a. git stage
b. git commit
c. git add
d. git reset

Question 3

How do you create a new branch in git?
a. git checkout -d <<branch name>>
b. git checkout -b <<branch name>>
c. git checkout -m <<branch name>>
d. git checkout ---new <<branch name>>

Question 4

What is the best way to ensure that folders and files
like (node_modules etc.) are never pushed to the git server?
a. Never stage these folders and files with "git add".
b. Always remove these folders and files before you do a "git commit"
c. Set a pre-receive hook to reject any such commit which tries to check in any of these 
   files or folders
d. Maintain a .gitignore file and mention all these files and folders in it.

Question 5

How would you list all available branches (including remote branches)?
a. git branch
b. git branch -a
c. git branch -m
d. git branch --list

Answers

  1. (c) git clone

  2. (c) git add

  3. (b) git checkout -b <<branch name>>

  4. (d) Maintain a .gitignore file and mention all these files and folders in it.

  5. (b) git branch -a