How to initialize a new git repo
Posted by SceDev
Last Updated: February 06, 2024

To initialize a new git repository, navigate to the folder you want to initialize with git.

After navigating to the folder, enter the following command in your terminal:

git init

 

The git init command creates a .git directory with all the necessary files (information) needed to keep track of the project.

Related Content
Git add and commit files
Git add and commit files
SceDev | Feb 04, 2024
Delete a file from a git repository
Delete a file from a git repository
SceDev | Feb 08, 2024
Git view commit history
Git view commit history
SceDev | Feb 09, 2024