Font size
Worksheetsgit and github
Total questions: 10
Worksheet time: 2mins
1.Which of the following is the correct way to initialize a new Git repository?
git add .
git init
git commit
2.You can type git status at any point while in a git controlled directory to check the status of your files?
True
False
3.Which of the following commands will stage your entire directory and every non-empty directory inside your current directory?
git status all
git add .
git commit all
4.We've just created a new file called index.html. Which of the following will stage this one file so we can commit it?
git add index.html
git add new
git commit index.html
5.How would you commit this with the message "adding new authors to index"?
git commit -m "adding new authors to index"
git commit "adding new authors to index"
git commit .
6.Which of the following commands will allow you to change branches?
git checkout
git clone
git add
git commit
7. What are the different options for git reset?
--hard
--soft
--skip
--mixed
8.Git and GitHub are the same thing?
True
False
9.Which of the following commands will create a new branch?
git checkout new-branch
git checkout -b new-branch
git clone new-branch
git create-branch new-branch
10.Staging, or git add, is required before creating a commit?
True
False
