Because I’ve had to do it a number of times, and had to look it up each time:
- Create the repo on github
- On the desktop/laptop/whatever, in Git Bash, change to the folder with the repo
- Run:
git remote add origin [email protected]:username/repo.git
, then
git branch --set-upstream master origin/master
and finally
git pull
And done.