Site icon TestingDocs.com

Git Basic Interview Questions

Introduction

On this page, we would discuss some basic Git interview questions. This would be of help for automation testing interviews.

What is Bash?

Bash stands for Bourne Again Shell (BASH)

A Shell is a user interface that allows interacting with computer resources. Shells can be graphical / command line. Bash is the default command-line shell on Mac OS and on most Linux distributions. It is also a simple scripting language for lightweight programming tasks.

What is Git?

Git is a free and open source distributed version control system. It is designed to handle everything from small to very large projects with speed and efficiency.

It allows groups of people to work on the same documents and files. In most cases, these files are source code. Using it we can make changes at the same time, and without stepping on each work.

What is Distributed Version Control System?

We can work with, and collaborate with different groups of people in different ways simultaneously within the same project. Distributed version control systems users or committers fully mirror the repository. If server node crashes, any of the client repositories can be copied back up to the server to restore it. Every clone is really a full backup of all the data. Git is one of the example of DVCS.

What is Repository?

A directory where Git has been initialized to start version controlling your files. A directory is a folder used for storing multiple files on the operating system.

/> git init

Initializes an empty repository.

 

How do you Commit to Git?

To store our staged changes, we run the commit command with a message describing what we’ve changed. Sample commit command.

/> git commit -m “Commit Message”

We use commit to store files listed in the Staging area, and they are not in our repository yet. We need to commit to store the files in repository.

 

Git Tutorial on this website can be found at:

https://www.testingdocs.com/git-tutorials/

For more details on the Git, visit the official website at:

https://git-scm.com

Exit mobile version