Archive for January 11th, 2013

Pushing an existing repo to github

Because I’ve had to do it a number of times, and had to look it up each time:

  1. Create the repo on github
  2. On the desktop/laptop/whatever, in Git Bash, change to the folder with the repo
  3. Run:

git remote add origin [email protected]:username/repo.git, then
git branch --set-upstream master origin/master and finally
git pull

And done.

,

No Comments