[go: up one dir, main page]

0% found this document useful (0 votes)
46 views12 pages

Top 10 GIT Interview Questions For Sdet

The document discusses 10 common GIT interview questions for SDETs. It covers topics like what GIT is, differences between GIT and SVN, advantages of GIT, what a repository and staging area are, and commands like commit, pull, fetch, stash, and stash drop.

Uploaded by

alliancedevlabs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views12 pages

Top 10 GIT Interview Questions For Sdet

The document discusses 10 common GIT interview questions for SDETs. It covers topics like what GIT is, differences between GIT and SVN, advantages of GIT, what a repository and staging area are, and commands like commit, pull, fetch, stash, and stash drop.

Uploaded by

alliancedevlabs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 12

Top 10 GIT Interview Questions for

SDET

By DevLabs Alliance

Visit us at: www.devlabsalliance.com


Email: training@devlabsalliance.com
Contact: +91 9717514555
GIT Interview Questions for SDET

1. What is GIT?

GIT is a Distributed Version Control System (DVCS) and Source Code Management System
(SCMS) which is used to track changes to a file and also allows to revert back to any
particular change.

It has an ability to handle small and large projects with efficiency and speed.
GIT Interview Questions for SDET

2. What is the difference between GIT and SVN?

The differences between GIT and SVN are as follows:

GIT SVN
GIT is a Decentralized Version Control tool. SVN is a Centralized Version Control tool.
Entire repository can be cloned on the local Version history is stored on a server-side
system. repository.
Commits are possible even if offline. Only online commits are allowed.
Push/Pull operations are faster. Push/Pull operations are slower.
Work is shared automatically on commit. Work is not shared automatically.
GIT Interview Questions for SDET

3. What are the advantages of GIT?

The advantages of GIT are as follows:

• Data redundancy and data replication is possible.


• Excellent network performance and disk utilization.
• There is only one .git directory per repository.
• Highly available service.
• Any type of project can use GIT.
• It is very easy to collaborate on any project.
GIT Interview Questions for SDET

4. What language is used in GIT?

C is the programming language that is used in GIT.

C ensures that the overhead of runtimes associated with high level languages are reduced
and hence making GIT faster.
GIT Interview Questions for SDET

5. What is a repository in GIT?

A GIT repository contains a directory named as .git where it keeps all of its metadata for
the repository.

All the contents of .git directory are private to GIT.


GIT Interview Questions for SDET

6. Which command is used to write a commit message?

git commit -a is used to write a commit message in GIT.

The -a is used to instruct the git to commit the new content of all tracked files that have
been modified.

If any new file needs to be committed for the first time, “git add<file>” is used before git
commit.
GIT Interview Questions for SDET

7. What is Staging Area or Index in GIT?

Commits can be changed, formatted and reviewed in an intermediate area, before the
completion of commits.

This intermediate area is called as Staging Area or Index.


GIT Interview Questions for SDET

8. What is the difference between Git Pull and Git Fetch?

git fetch downloads any new data from a remote repository but it doesn’t integrate this
downloaded data into the working files.

git pull downloads and also merges the data from a remote repository into the working
files.
It can merge conflicts as well if local changes are not committed.

git pull = git fetch + git merge


GIT Interview Questions for SDET

9. What is Git Stash?

Git Stash takes the current state of the working directory and puts it on the stack for later
and hence providing a clean working directory.

Git Stash is used when we need to switch to any other job and at the same time we don’t
want to lose our existing work.
GIT Interview Questions for SDET

10. What is Git Stash drop?

When we want to remove the stashed item from the list, then git stash drop command is
used.

It removes the last added item in stash by default and it can also remove a specific item if
included as an argument.
Visit us at: www.devlabsalliance.com
Email: training@devlabsalliance.com
Contact: +91 9717514555

You might also like