Member-only story

What is Git? — Git operation and command

Utsav Desai
5 min readFeb 4, 2023

--

Git is a distributed version control system that allows you to keep track of changes made to files and collaborate with others on a project.

Git’s goal is to manage a project or set of files as they change over time. Git stores this data in a data structure known as a Git repository. Git’s heart is the repository. To be clear, a Git repository is the directory that contains all of your project files and metadata. Git keeps track of the project’s current state by creating a tree graph from the index. It is typically represented by a Directed Acyclic Graph (DAG).

Here are some common Git commands and their operations:

1. git init — Initializes a Git repository in the current directory.

syntax: git init [repository name]

This command is used to start a new repository.

2. git clone — Clones a Git repository from a remote source to your local machine.

syntax: git clone [url]

This command is used to obtain a repository from an existing URL.

3. git add — Adds changes in the working directory to the staging area.

--

--

Utsav Desai
Utsav Desai

Written by Utsav Desai

Utsav Desai is a technology enthusiast with an interest in DevOps, App Development, and Web Development.

No responses yet