GitLab/Git%20MCQ Sample Test,Sample questions

Question:
Git command that helps us initialize git repository for the project (folder) that we intend to track using version control system Git is

1.git config

2.git init

3.git add .

4.None of These

Posted Date:-2022-11-10 13:24:28


Question:
Git command that lets you get and set configuration variables that control all aspects of how Git looks and operates is

1.git config

2.git --version

3.git init

4.All of the above

Posted Date:-2022-11-10 13:17:28


Question:
Git command to list all the settings Git can find at any point of time is

1.git config B.git config --settings C.D.

2.git config --settings

3.git --list

4.git config --list

Posted Date:-2022-11-10 13:19:45


Question:
git command which displays the files that have been modified is

1.git log --patch

2.git log -p

3.None of the above

4.Both of the above

Posted Date:-2022-11-10 13:50:53


Question:
Git is a __________

1.Distributed version control system

2.Centralized version control system

3.Localized version control system

4.All of the above

Posted Date:-2022-11-10 13:06:59


Question:
git log --oneline command will display

1.one commit per line

2.the first seven characters of the SHA

3.the commit message

4.All of the above

Posted Date:-2022-11-10 13:49:26


Question:
Git log command contains following data

1.commit hash

2.commit date metadata

3.commit author metadata

4.All of the above

Posted Date:-2022-11-10 13:48:16


Question:
Tags in git can be

1.light-weighted tag

2.heavy-weighted tag

3.annotated tag

4.All of the above

Posted Date:-2022-11-10 13:33:45


Question:
The act of transferring commits from your local repository to a remote repository is known as ___________

1.push

2.pull

3.clone

4.rebase

Posted Date:-2022-11-10 13:31:20


Question:
The reference to the remote repository from where a project was initially cloned is called __________

1.origin

2.tag

3.head

4.index

Posted Date:-2022-11-10 13:32:23


Question:
To get the comprehensive manual page (manpage) help for any of the Git commands we can use

1.git help

2.git --help

3.man git- Dof the above

4..Any of the above

Posted Date:-2022-11-10 13:22:28


Question:
What does the below git command indicates?

git add *.java

1.The above command will stage all the Java source files

2.The above command will commit all the Java files

3.The above command will exclude all the Java files while staging

4.It will give error - "invalid command"

Posted Date:-2022-11-10 13:38:18


Question:
What is full form of VCS?

1.Version Configuration System

2.Version Consolidated Solutions

3.Version Configuration Solutions

4.Version Control System

Posted Date:-2022-11-10 13:05:43


Question:
What represents the last commit in the current checkout branch in git?

1.head

2.index

3.master

4.origin

Posted Date:-2022-11-10 13:33:01


Question:
Which command can help you to switch branch without committing the current branch?

1.fetch

2.stash

3.fork

4.branch

Posted Date:-2022-11-10 13:30:41


Question:
Which command helps us to see the tracked, untracked files and changes but does not show any commit records?

1.git status

2.git diff

3.git log

4.Both A & C

Posted Date:-2022-11-10 13:47:22


Question:
Which git command can help to stash a change with a message?

1.git stash save "message"

2.git stash -m "message"

3.git stash save -m "message"

4.git stash "message"

Posted Date:-2022-11-10 13:39:22


Question:
Which is the correct git command to add files to the repository?

1.git add

2.git add fileName

3.both of the above

4.None of the above

Posted Date:-2022-11-10 13:34:45


Question:
Which of the following are the stages in which your git file can reside?

1.modified

2.staged

3.committed

4.Any of the above

Posted Date:-2022-11-10 13:16:44


Question:
Which of the following are type of reset facility available in git?

1.soft

2.hard

3.mixed

4.All of the above

Posted Date:-2022-11-10 13:29:50


Question:
Which of the following command in git helps create copy of target repository?

1.pull

2.fetch

3.clone

4.tag

Posted Date:-2022-11-10 13:29:10


Question:
Which of the following command is used to switch between branches in a repository?

1.checkout

2.clone

3.fetch

4.pull

Posted Date:-2022-11-10 13:28:18


Question:
Which of the following git command can be used to check the stored stashes?

1.git stash list

2.git stash

3.git stash set

4.git stash map

Posted Date:-2022-11-10 13:40:50


Question:
Which of the following git command helps to add multiple changes at the same time?

1.git add -all

2.git add

3.git add . "fileName"

4.git add ...

Posted Date:-2022-11-10 13:37:09


Question:
Which of the following is correct git command to set your username during git initial setup? 

1.git config --global user.name "Rajneesh"

2.git config --global user "Rajneesh"

3.git init config --global user.name "Rajneesh"

4.git --global user.name "Rajneesh"

Posted Date:-2022-11-10 13:18:44


Question:
Which of the following is example of distributed version control?

1.Git

2.Mercurial

3.SVN

4.Both A & B

Posted Date:-2022-11-10 13:13:04


Question:
Which of the following is git tool?

1.Git Bash

2.GitK

3.Git GUI

4.All of the above

Posted Date:-2022-11-10 13:26:41


Question:
Which of the following is not true about git?

1.By default Git has a master branch

2.Git clone operation creates the instance of the repository.

3.Pull operation copies the changes from a local repository to remote repository

4.All of the above

Posted Date:-2022-11-10 13:11:55


Question:
Which of the following is the correct git command to commit changes with proper message?

1.git commit

2.git commit "message"

3.git commit -m "message"

4.git commit -a "message"

Posted Date:-2022-11-10 13:35:36


Question:
Which of the following is true about Git?

1. Git does not rely on the central server.

2. Git require network connection only to publish your changes and take the latest changes.

3. Every git checkout is a full backup of the server repository.

1.Only 1 & 2

2.Only 1 & 3

3.Only 2 & 3

4.All of the above

Posted Date:-2022-11-10 13:08:36


Question:
Which of the following is true related to git init command?

1. A .git folder (sub-directory) is created within your git project (directory) once you run the git init command

2. .git is generally hidden folder.

1.only 1

2.only 2

3.Both 1 & 2

4.None of the 1 & 2

Posted Date:-2022-11-10 13:25:52


Question:
Which of the following option is not valid with git stash command?

1.git stash list

2.git stash changes

3.git stash list pop

4.git stash list push

Posted Date:-2022-11-10 13:41:37


Question:
Which of the following statement is true about git ignore file?

1.The .gitignore file contains all the formats and files that should be ignored while commit

2.We can create multiple ignore files in a different directory.

3.Both of the above

4.None of the above

Posted Date:-2022-11-10 13:42:54


Question:
Which of the following terminology is not related to git?

1.staging area

2.fork

3.branch

4.stem

Posted Date:-2022-11-10 13:10:46


Question:
Which of the following will help you create a git repository?

1.create your local project and execute init command on that project path

2.clone remote repository

3.both of the above

4.None of these

Posted Date:-2022-11-10 13:46:38


Question:
Who created Git?

1.Dennis Ritchie

2.Linus Torvalds

3.Linus Babbage

4.James Gosling

Posted Date:-2022-11-10 13:15:29


Question:
_____ is a version of the repository that diverges from the main working project.

1.master

2.branch

3.fork

4.clone

Posted Date:-2022-11-10 13:27:29


More MCQS

  1. Git MCQ
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!