Git keeps track of all the submodules and their paths in the project in _
Select the correct answer from below options
a) .gitmodules file
b) .git folder
c) .gitmodule file
d) Remote repository

Correct answer of above question is : a) .gitmodules file

On adding a subproject using git submodule add, how many files will be added in the main repository?
Select the correct answer from below options
a) 4
b) 1
c) 2
d) 3

Correct answer of above question is : c) 2

The reference of the deleted commit can be got using git reflog.
Select the correct answer from below options
a) True
b) False

Correct answer of above question is : a) True

We can reset Git Bisect using git bisect reset even in the middle of a bisect.
Select the correct answer from below options
a) True
b) False

Correct answer of above question is : a) True

The purpose of Git Blame is to find __
Select the correct answer from below options
a) Who wrote the feature
b) Who created the file
c) The commit and the author of a particular line
d) When a file was created

Correct answer of above question is : c) The commit and the author of a particular line

The result of git blame filename will return the original lines of source code in the console.
Select the correct answer from below options
a) False
b) True

Correct answer of above question is : b) True

Which of the following is a server-side hook?
Select the correct answer from below options
a) prepare-commit
b) post-receive
c) pre-commit
d) post-commit

Correct answer of above question is : b) post-receive

Which type of search is used in Git Bisect?
Select the correct answer from below options
a) Binary search
b) Linear search
c) Jump search
d) Interpolation search

Correct answer of above question is : a) Binary search

How to get a complete reflog of all refs?
Select the correct answer from below options
a) git reflog show –all
b) git reflog show
c) git reflog
d) git reflog –all

Correct answer of above question is : a) git reflog show –all

When you run git commit, which hook(s) is are called?
Select the correct answer from below options
a) Both pre and post commits
b) pre-commit
c) succeeding-commit
d) post-commit

Correct answer of above question is : a) Both pre and post commits

A tag in Git context is a ___.
Select the correct answer from below options
a) Reference to a specific commit
b) Keyword
c) Search String

Correct answer of above question is : a) Reference to a specific commit

Which command is useful to undo a git rebase?
Select the correct answer from below options
a) git undo
b) git blame
c) git log
d) git reflog

Correct answer of above question is : d) git reflog

Reflog entry has timestamps attached to it.
Select the correct answer from below options
a) True
b) False

Correct answer of above question is : b) False

Which option is used to remove a single stash entry from a list of stash entries?
Select the correct answer from below options
a) drop
b) delete
c) remove
d) clear

Correct answer of above question is : a) drop

Developer A has done some changes in the subproject and pushed it. Developer B can pull those changes using __
Select the correct answer from below options
a) git fetch origin
b) git submodule update
c) git pull origin
d) git submodule add

Correct answer of above question is : b) git submodule update

The indexed changes in a subproject can be viewed using __
Select the correct answer from below options
a) git submodule status
b) git show
c) git submodule show
d) git status

Correct answer of above question is : a) git submodule status

What is the command to store the uncommitted changes temporarily?
Select the correct answer from below options
a) git commit
b) git tempstore
c) git stash
d) git store

Correct answer of above question is : c) git stash

How to declare that a commit is errorless in Git Bisect?
Select the correct answer from below options
a) git bisect errorless
b) git bisect perfect
c) git good bisect
d) git bisect good

Correct answer of above question is : d) git bisect good

Developer A had initialized a new repo and moved it to the hooks folder. What would be the extension of the files present in it?
Select the correct answer from below options
a) .yml
b) .sample
c) .git
d) .secret

Correct answer of above question is : b) .sample

Which scripting language is used in the default sample hook files?
Select the correct answer from below options
a) Ruby
b) PHP
c) Python
d) Shell

Correct answer of above question is : d) Shell

Old reflog entries can be cleaned using __
Select the correct answer from below options
a) git reflog remove
b) git reflog clean
c) git reflog -d
d) git reflog expire

Correct answer of above question is : d) git reflog expire

Are Git hooks files version controlled?
Select the correct answer from below options
a) No
b) Yes

Correct answer of above question is : a) No

The result of the command git blame filename will have the following, except _
Select the correct answer from below options
a) updated timestamp
b) commit hash
c) author’s email address
d) author’s name

Correct answer of above question is : c) author’s email address

The email address of the author can be got instead of the authors name in the result using __.
Select the correct answer from below options
a) git blame -a filename
b) git blame -E filename
c) git blame filename
d) git blame -e filename

Correct answer of above question is : d) git blame -e filename

Developer A found that a button, which was working fine earlier is not working in the project.
It is not sure which commit introduced this bug! Which of the following Git commands would you suggest?
Select the correct answer from below options
a) Git binary search
b) Git search
c) Git blame
d) Git bisect

Correct answer of above question is : d) Git bisect

How to declare that a commit is buggy in Git Bisect?
Select the correct answer from below options
a) git bisect error
b) git error bisect
c) git bisect bug
d) git bisect bad

Correct answer of above question is : d) git bisect bad

Which option in Git Blame is used to filter only the commit hash?
Select the correct answer from below options
a) -L
b) -E
c) -s
d) -S

Correct answer of above question is : c) -s

Can branches be created inside the Git submodule?
Select the correct answer from below options
a) No
b) Yes

Correct answer of above question is : b) Yes

Can a commit be taken from one branch and moved to a different branch in Git?
Select the correct answer from below options
a) No
b) Yes

Correct answer of above question is : b) Yes

Is it possible to get merge conflict during Git cherry-pick?
Correct answer of above question is : Yes

Which option can be used to change the commit message during Git cherry-pick?
Correct answer of above question is : -e

Leave a Reply

Your email address will not be published. Required fields are marked *