Sangam-Git

What is a repository?

A repository — everyone says "repo" — is a project folder that Git is watching. It holds your files and the full history of every change ever made to them.

Imagine a folder on your laptop called zomato-clone where you're building a food-delivery app for a class project. The moment you tell Git to track that folder, it becomes a repository. From then on, Git quietly records every snapshot you take.

What's inside a repo

Two things live together:

  1. Your actual files — the code, images, and text you're working on right now. This is called the working directory.
  2. The history — every past snapshot, stored in a hidden folder called .git. You never touch this directly; Git manages it.

If you delete the .git folder, you keep your current files but lose all the history. So don't do that.

Making a repository

There are two common ways to get a repo.

Start a brand-new one in an existing folder:

cd zomato-clone
git init

git init creates the hidden .git folder. Your project is now a repository.

Or copy an existing one from a server (this is called cloning — it has its own page):

git clone https://sangam.example.com/acme/payments.git

Local repo vs remote repo

This trips up beginners, so read slowly:

  • The repo on your laptop is your local repo. You do all your work here.
  • The repo on a server like Sangam-Git is a remote repo. It's the shared copy the whole team can reach.

They are copies of each other. You work locally, then push your commits up to the remote so teammates can see them, and pull their commits down. Nothing you do locally affects the team until you push.

A repo per project

The normal rule: one repository per project or service. A startup in Hyderabad building a delivery app might have separate repos like:

  • web — the customer website
  • mobile — the Android/iOS app
  • payments — the service that talks to Razorpay or UPI
  • docs — internal documentation

Each repo has its own history and its own team of collaborators.

Key idea: A repository is just a folder plus its memory. Everything else in Git is about adding to that memory (commits) and sharing it (push, pull, pull requests).