Join us on the demo, while our product experts provide a detailed walkthrough of our enterprise platform.

How Git Local Repository Works

In this article, I will talk about how Git Local Repository Works

Abhimanyu Singh Rathore
Abhimanyu Singh Rathore
April 12, 2021
2 min read

How Git Local Repository Works

Let's understand how git set up a local repository Once we initialize or clone any git project that will set up a local project environment.

that whole environment will look like the below picture


Project Folder: The main folder consists of a workspace and local repository

Work Directory: Inside Project Folder where we actually work,  we keep all files and perform many operations like addition, update, deletion of files

Local Repository: Here we don't actually change anything, this is handled automatically by git. this consists staging area, commit history, stash area etc.

Let's get into it step by step and see how we perform command or action and behind the scene, git do its own activity.

  • Step 1. Git clone and project: 3


  • Step 2. Explore what we got in repository 5


  • Step 3. Do some modification in a files 7


  • Step 4. Add this file in to staging (ready for commit) 9


  • Step 5. Commit the file 11


  • Step 6. Push the changes 13


Hope this makes clear how git handling things at the local repository.

LoginRadius Docs

Implement Authentication in Minutes

click here

Most Popular Tags


Are your customers safe on your application?

According to Forbes, data breaches exposed 4.1 billion records in the first six months of 2019. If this gets you worried, we’ve got your back!

LoginRadius protects your customers’ identities. We provide world-class security for your customers during login, registration, password setup, and any other data touchpoints, and make sure that their data is safe. We do so through by offering open source SDKs, integrations with over 150 third party applications, pre-designed and customizable login interfaces, and best-in-class data security products such as MFA, RBA, and Advanced Password Policies. The platform is already loved by over 3,000 businesses with a monthly reach of 1.17 billion users worldwide.Secure Your Application Now

Abhimanyu Singh Rathore

Abhimanyu Singh Rathore

A Fun loving, Technocrat, Artist, Photographer, Nature Lover, Bold, Leisure traveller, Sightseer, Developer, A Surprise Package to Explore!

View Profile

Try a Modern Authentication Solution

$0/ month

Free Sign Up
  • 7,000 Monthly Active Users
  • 1 Web or Mobile App
  • Email/Password Login
  • 3 Social Login Providers
  • User Data Storage
  • Transactional Email Template
  • Customizable Login Interfaces