sudo apt install git

A. Create a new project on github then clone

Step 1: Create a new Github repo

Step 2: Clone

git clone repo_address

B. Push an existing project to github This is just my note, you had better go here for up-to-date information. https://docs.github.com/en/github/importing-your-projects-to-github/adding-an-existing-project-to-github-using-the-command-line

Step 1: Create a new GitHub Repo

Step 2: Initialize Git in the project folder

  git init
  git add -A
  git commit -m 'Added my project'
  git remote add origin git@github.com:sammy/my-new-project.git
  git push -u -f origin master

Add key

A repository can hold many folders