Creating repository for existing project on Github

A lil note on how to make a new repository on GitHub of an existing local project

  1. Create a new repository on GitHub.
  2. Open your terminal
  3. cd to the project you want to create on Github
  4. Initialize the local directory as a Git repository git init
  5. Add the files to your new local repository. git add .
  6. Commit the added files git commit -m "first commit"
  7. Copy the HTTPS URL of your newly created repository and add the URL to the following command git remote add origin <remote repository URL>

then just push to GitHub git push origin master