Site icon TestingDocs.com

Create a new Git Repository [ 2024 ]

Create a New Git Repository

Repositories are like directories that hold the project files. A Git Repository, also known as a Repo, is a storage space for the project. Git is a distributed version control system that tracks source code changes during software development. It helps multiple developers collaborate on a project by allowing them to work simultaneously, maintain a history of changes, and merge modifications made by different contributors.

 

New Git Repository

If you start a new project, you can initialize a Git repository by running the git init command in the project directory, creating a .git directory that tracks all the project changes.

Create a Git Repo on Your Local Machine

Let’s create a new repository using the git command line. The steps to create a new repository are as follows

 

 

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:

 

Create a Repo on GitHub

Common error

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

 

Git Tutorials

Git Tutorials on this website:

More information on Git, official website:

 

Exit mobile version