GIT Basic FAQ’s
Here is a list of 20 basic-level Git interview questions with examples and detailed explanations. These questions cover the fundamental concepts of Git that are commonly asked in interviews.
1. What is Git, and why is it used?
Git is a distributed version control system used to track changes in the source code during software development. For instance, multiple developers can work on different features of a project simultaneously without interfering with each other’s work.
Git allows you to create snapshots of your code at any point, called commits. These commits create a history of changes, which is invaluable when debugging, adding features, or collaborating on a project. It helps to revert back to a previous version of code if needed.
2. How do you initialize a new Git repository?
To start tracking files in a new project folder, use
git init
This command creates a new .git directory in the folder, turning it into a Git repository. After initializing, Git starts tracking changes to the files within the folder.
Comments are closed