Author : MD TAREQ HASSAN | Updated : 2023/02/18

Create Repository

Remote repository (in your Github account)

Create Github Repository

Local repository (your personal PC or company’s PC)

Now execute following commands:

# Create local repository:
git init

# Now add files if you want

# Check status:
git status

# Staging:
git add .

# Check status:
git status

# Commit changes:
git commit --message "<message here>"

Copy and note down ssh url of the remote repository. Now execute following commands:

git remote add origin <repository ssh url>
git branch -M main
git push -u origin main

Clone Repository

Copy remote repository url (ssh url)

Clone remote repository

Now

git clone <repository ssh url>

# example: git clone git@github.com:hovermind/demo-repo3.git