Create a new Git Repository

Overview

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

https://www.testingdocs.com/questions/how-to-create-a-repository-on-github/

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:

~\testingdocs\SampleProject\.git

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

https://www.testingdocs.com/questions/how-to-fix-fatal-not-a-git-repository-error/