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
TIP: On macOS you can show or hide invisible les by hitting Cmd–Shift-Period(.)
Initialize a Git Repo
In your terminal (Terminal, Git Bash, or Windows Command Prompt), navigate to the folder you wish to make into a Git repo.
Enter this command:
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: