git push new repo to remote

C++
$ git remote add origin <remote repository URL>
# Sets the new remote

# Push the changes in your local repository to GitHub.
$ git push -u origin master
# Pushes the changes in your local repository up to the remote repository you specified as the origincd rhq
git push https://github.com/user/example master:master

Source

Also in C++: