Create a new Git Repository


Repositories are like directories that hold the project files. We can create a new repository on both the GitHub website and on local machine using the Git command-line client. Let’s create a new repository using the git command line.

GitHub Repository

New Git Repository

Steps to create a new repository are as follows

new Git Repository


git init

git init command creates a .git folder within the project directory. For example, in the above case:


This directory has the information to track the changes to the project. Sample .git folder on Windows machine would like as shown:


.git Folder Sample Windows


Common error