You start to write code locally in a directory and you want to keep track on file changes in a Git database and then upload (push) it to GitHub.
You have some files already in a directory and you start a Git repo locally by executing
Now stage it and commit it.
git add .
git commit -m 'initial commit'
Once you create a repo on GitHub, you have a link to the GitHub repo in the page. Using that SSH repo link, you can push it to GitHub.
Now configure the remote repo in local Git database.
git remote add origin firstname.lastname@example.org:hiriumi/oci-resources.git
And then, push it to the upstream repo.
git push --set-upstream origin master
You won’t need
--setup-upstream origin master from the subsequent pushes.