Git and Github

Create a local repository in Git with step by step commands

Posted On
Posted By admin

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!

If you like this post, please do let me know via the comments box below.  You can also connect with me via my Facebook Page or subscribe to my Youtube channel!

Related Post