Last Updated On
Welcome to the Git Quiz!
Git Multiple Choice Questions – MCQ1
Answers
1) c) Version Control System
Git is a distributed version control system that allows multiple users to track and manage changes in software projects.
2) a) False
Git is a distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
GitHub is a web-based platform built on top of Git to facilitate code collaboration and sharing.
3) a) git –version
4) d) git init
To learn more about this command, please refer to How to create a new Git Repository – git init Command.
5) a) –global
To set the default user name for every repository on your computer, you can use the git config command with the --global option.
6) c) git config user.email
git config --global user.name "Your Name"
7) d) git log
To learn more about this command, please refer to How to track commits in Git – git log command
8) a) git add –all
To learn more about this command, please refer to How to stage changes in Git – git add Command
9) a) git add
To learn more about this command, please refer to How to stage changes in Git – git add Command
10) a) git status
11) a) Ignored files are tracked in a special file named as .gitignore named which is checked in at the root of the repository.
To learn more about this command, please refer to How to ignore files in GIT – gitignore
12) a) False
13) c) git commit
To learn more about this command, please refer to How to commit changes in GIT – git commit command
14) b) git rm
To learn more about this command, please refer to How to unstage the changes in Git – git rm command
15) a) git commit -m “New attribute”
16) d) Repository metadata and version history
17) a) A separate version of the main repository.
18) b) A list of remote repositories you are connected to
19) b) git log -n
To learn more about this command, please refer to How to track commits in Git – git log command
20) d) Commit history is never automatically deleted.
21) c) git branch
To learn more about this command, please refer to How to create a branch in GIT
22) a) git checkout new-email
23) a) -b
git checkout -b feature/customerDetails
To learn more about this command, please refer to How to create a branch in GIT
24) a) git switch
git switch command allows you to switch to a different branch. Before Git version 2.23, the common approach was git checkout.
25) a) git remote add origin https://abc.xyz/d/e.git