Need Assistance?

support@tutorialshub.in

Git Fundamentals

Creating a repository

ADVERTISEMENT
Git Free Lesson
5 min read
ADVERTISEMENT

Turn a project directory into a repository

git init creates the hidden .git directory that contains the repository's metadata, object database and references. Your normal project files remain in the working directory.

Understand the three areas

Git work is easiest to understand as three areas: the working tree contains your current files, the staging area contains the exact changes selected for the next commit, and the repository contains committed history.

After initialization, Git does not automatically commit every file. You decide which changes belong in the next snapshot by staging them.

ADVERTISEMENT