CLI and Git Workflow

Question 1
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 2
Marks : +2 | -2
Pass Ratio : 100%
Which of the following is a revision control system?
Git
NumPy
Slidify
None of the mentioned
Explanation:
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
Question 3
Marks : +2 | -2
Pass Ratio : 100%
Which of the following command line environment is used for interacting with Git?
GitHub
Git Bash
Git Boot
All of the mentioned
Explanation:
Git for Windows provides a BASH emulation used to run Git from the command line.
Question 4
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.
Question 5
Marks : +2 | -2
Pass Ratio : 100%
cp command can be used to copy the content of directories.
True
False
Explanation:
-r flag should be used for copying the content.
Question 6
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 7
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 8
Marks : +2 | -2
Pass Ratio : 100%
Point out the correct statement.
You don’t need GitHub to use Git
CLI can help you to organize files and folders
Navigation of directory is possible using CLI
None of the mentioned
Explanation:
CLI stands for Command Line Interface.
Question 9
Marks : +2 | -2
Pass Ratio : 100%
Which of the following CLI command can also be used to rename files?
rm
mv
rm -r
none of the mentioned
Explanation:
mv stands for move.
Question 10
Marks : +2 | -2
Pass Ratio : 100%
Point out the correct statement.
CLI can help you to organize messages
CLI can help you to organize files and folders
Navigation of directory is possible using CLI
None of the mentioned
Explanation:
CLI stands for Command Line Interface.