Skip to main content
/1 min read

How to Create a Git Repository: git init

Essential Git Commands

git status

What's changed, staged, and untracked — your most-used command.

git diff

See exactly what's different before staging.

git log

Inspect commit history with --oneline or --graph for visualization.

git reset

Undo staging or commits — careful with --hard.

Build Programming Foundations at Noble Desktop

Noble Desktop's Full-Stack Web Development Certificate teaches Git alongside the modern web stack — a must for any developer.

Discover the intricacies of initializing a Git repository and enhance your coding skills with our comprehensive courses and bootcamps tailored for all experience levels.

A Git repository (or repo for short) contains all of the project les and the entire revision history. You’ll take an ordinary folder of les (such as a website’s root folder), and tell Git to make it a repository. This creates a.Git subfolder, which contains all of the Git metadata for tracking changes.

On Unix-based operating systems such as macOS, les and folders that start with a period (.) are hidden, so you will not see the.Git folder in the macOS Finder unless you show hidden les, but it’s there! You might be able to see it in some code editors.

TIP: On macOS you can show or hide invisible les by hitting Cmd–Shift-Period(.)

Initialize a Git Repo

  1. In your terminal (Terminal, Git Bash, or Windows Command Prompt), navigate to the folder you wish to make into a Git repo.

  2. Enter this command:

    Git init

Go Beyond Git

We offer the best coding courses and bootcamps for students at all levels of experience. Classes are hands-on and students receive workbooks with step-by-step instructions through exercises with real-world applications. Check out our programming courses now: