CLI and Git Workflow

Question 1
Marks : +2 | -2
Pass Ratio : 100%
Which of the following command updates tracking for files that are modified?
git add .
git add -u
git add -A
none of the mentioned
Explanation:
The git add command adds a change in the working directory to the staging area.
Question 2
Marks : +2 | -2
Pass Ratio : 100%
Which of the following command is used to give a message description?
git command -m
git command -d
git command -message
none of the mentioned
Explanation:
This only updates your local repository.
Question 3
Marks : +2 | -2
Pass Ratio : 100%
Point out the wrong statement.
You need GitHub to use Git
GitHub allows you to share repositories with others
GitHub allows you to access others repositories
All of the mentioned
Explanation:
GitHub can store a remote copy of your repository.
Question 4
Marks : +2 | -2
Pass Ratio : 100%
branch command is used to determine which branch you are currently in.
True
False
Explanation:
-r flag should be used for copying the content.
Question 5
Marks : +2 | -2
Pass Ratio : 100%
Which of the following web hosting service use Git control system?
GitHub
Open Hash
Git Bash
None of the mentioned
Explanation:
GitHub is a Web-based Git repository hosting service, which offers all of the distributed revision control and source code management (SCM) functionality of Git.
Question 6
Marks : +2 | -2
Pass Ratio : 100%
Which of the following command allows you to change directory to one level above your parent directory?
cd
cd.
cd..
none of the mentioned
Explanation:
cd stands for change directory.
Question 7
Marks : +2 | -2
Pass Ratio : 100%
Which of the following statement would create branch named as ‘sanfoundry’?
git checkout -b sanfoundry
git checkout -c sanfoundry
git check -b sanfoundry
none of the mentioned
Explanation:
A branch in Git is simply a lightweight movable pointer to one of these commits.
Question 8
Marks : +2 | -2
Pass Ratio : 100%
Which of the following command allows you to update the repository?
push
pop
update
none of the mentioned
Explanation:
The git branch command is your general-purpose branch administration tool.
Question 9
Marks : +2 | -2
Pass Ratio : 100%
Which of the following is the correct way of creating GitHub repository in to well labelled commits?
Fork another user’s repository
Pop another user’s repository
Zip another user’s repository
None of the mentioned
Explanation:
A fork is a copy of a repository.
Question 10
Marks : +2 | -2
Pass Ratio : 100%
Which of the following adds all new files to local repository?
git add .
git add -u
git add -A
none of the mentioned
Explanation:
You should do this before committing.