GIT – What Is A GIT Repository ?


What Is A GIT Repository ?

Table Of Contents

  1. What Is Git Repository ?
  2. Types Of Git Repository ?

(1) What Is A GIT Repository?

  • A Git repository (repo) is a storage location where all the files, history, and version control information of a project are kept.
  • It helps track changes, collaborate with others, and revert to previous versions when needed.

(2) Types Of GIT Repository?

  • There are two types of Git repository.
    1. Local Repository
    2. Remote Repository

(3) Local GIT Repository.

  • Store all the file history, branches and other settings in your local computer.
  • A Git repository is the .git/ folder inside a project
  • This repository tracks all changes made to files in your project, building history over time. 
  • Meaning, if you delete the .git/ folder, then you delete your project’s history.
  • Contains a .git folder where Git stores the commit history, branches, and configurations.
  • This is the local repository.

(4) Remote GIT Repository.

  • Hosted on a remote server (e.g., GitHub, GitLab, Bitbucket).

  • Shared with a team for collaboration.

  • You connect to it using:
git remote add origin <repository-url>

Leave a Reply

Your email address will not be published. Required fields are marked *