git add origin to existing repo code example
Example 1: initialize a repo and push to github
git init
git add -A
git commit -m 'Added my project'
git remote add origin [email protected]:sammy/my-new-project.git
git push -u -f origin master
Example 2: git push existing code to new repository
git remote add origin <remote repository URL>