connect local repo with remote repo

git remote add origin <remote_repo_url>
git push --all origin

If you want to set all of your branches to automatically use this remote repo when you use git pull, add --set-upstream to the push:

git push --all --set-upstream origin

One line exact answer is provided by "vergenzt" but if you want to go through the detail on how to commit your code and connect local and remote github repo and push code into remote repo using git cli, you can go through this article : https://medium.com/geekstrends/a-beginners-guide-to-starting-with-git-cli-1d5c44af0a4