Difference between revisions of "Git cheatsheet"

From Applied Optics Wiki
Jump to: navigation, search
(Created page with " === To start GIT for the first time=== Issue this in the root directory of the project git init === Adding files to the repo === Note this doesn't protect them yet but jus...")
 
(No difference)

Latest revision as of 14:37, 12 June 2014


To start GIT for the first time

Issue this in the root directory of the project

git init


Adding files to the repo

Note this doesn't protect them yet but just lets GIT know you want to protect them

git add <list of files I want>
git commit -m "my notes on the day"

Committing files (ie protecting them)

git add <files I want tracked>
git commit -m "more messages"

or to commit all files previous added

git commit -a -m "more messages"