Monthly Archives: January 2016

Initial upload of local code to repo on github

Another quick note to self ‘cos this is something that I can never remember.

After creating a local repo with the project being developed, we need to create the repo at https://github.com/slugbucket and then run the following commands on teh local workstation.

$ git push --set-upstream https://github.com/slugbucket/automation-demo-packages.git master
$ git remote add origin https://github.com/slugbucket/automation-demo-packages.git
$ git push -u origin master

Enter the github username and password when prompted.

If the repository on github was created with an initial README.md file, it will first be necessary to do a merge with the following command,

$ git pull https://github.com/slugbucket/automation-demo-packages.git

Then the push commands above will wok fine.

Advertisements