Skip to the content.

Create a GitHub Repo and Commit

Initialize Git in your Project Folder

cd path/to/your/project-folder

Navigate to your project directory

git init

It transforms the Directory into Git Repository, allowing Git to track changes within it.

Add files and make your first commit

git add .

It adds all new, modified, and deleted files in the current directory and its subdirectories to the staging area (also known as the index).

git commit -m "Initial Commit"

It captures a snapshot of the currently staged changes, creating a new point in the project’s history.

Create a new repository

gh repo create project-folder --public --source=. --remote=origin --push

gh repo create

project-folder

--public

--source=.

--remote=origin

--push

Difficulty: ⭐ Beginner