sreenivas./courses
Git & GitHub for Beginners — all lessons

$ git init

Initialized empty Git repository

MODULE 01 · 5 MIN READ

git init — give a folder a memory

First follow-along — type this with me, slowly. Three lines: make a folder, step inside it, switch on the time machine.

git bash

$ mkdir my-project

$ cd my-project

$ git init

Initialized empty Git repository in .../my-project/.git/

What just happened

A repository is simply a folder Git is watching. The memory lives in a hidden .git folder that Git just created. Your files don't change at all — Git only adds its filing cabinet.

Try it — right here

This practice terminal is a tiny simulated laptop. You cannot break it — worst case, refresh the page and start fresh.

practice terminal — you cannot break it

a tiny simulated laptop. six commands, zero consequences.

$ 

// try: git init