Create a local repository in Git with step by step commands

In this article, I will be listing down a few basic instructions to create a local repository in git.

Step 1: Open a command prompt/terminal window. Navigate to the directory where you want to create a git repository.

Step 2: Initialize the directory as a local repository using the following command:

git init

Step 3: Add the files from the current directory to the local repository:

git add .

 

Step 4: Commit files to your local repository:

git commit -m "Initial commit"

That is all!

Comments

Popular posts from this blog

How to use logging in SpringBoot with code samples

Python While Loop with code samples

How to convert a List to a Set