add a local repository to github code example
Example 1: git push existing code to new repository
git remote add origin <remote repository URL>
Example 2: how to add a repository to github
git & github
git remote add origin <remote repository URL>
git & github