Git Cheat Sheet

From Nearline Storage
Revision as of 22:55, 31 December 2019 by Dlk (talk | contribs)

Jump to navigation Jump to search

Create A New Project Repository

  1. Go to https://github.com/new and create a new repository (project)
  2. Create a directory on the local workstation and populate it with the source files, then in that directory do:
$ git init
$ git add .
$ git commit -m "first commit"
$ git remote add origin git@github.com:dlk3/projectname.git
$ git push -u origin master

Pull Down Changes Made At Remote Repository

$ git pull origin master

Push Local Changes Up To Remote Repository

$ git commit -a -m "Description"
$ git push