knitr::opts_chunk$set(echo = TRUE)


version control all the things

SOURCE CONTROL IS FOR ALL THE THINGS

Who's a git?

Not who* but what...

Git is source control that is

* Well OK, Linus Torvald did name it after himself

A (simple) Git workflow

Clone a copy of the code {data-background="http://img.lum.dolimg.com/v1/images/clone-trooper-armor_607fbd6a.jpeg"}

Take a copy of the code for you to work on without preventing anyone else from doing the same, and most definiitely not damaging the remote copy

git clone https://github.com/stephlocke/Rtraining.git

Branch the code {data-background="http://www.alternet.org/files/story_images/hunter-s.-thompson-fear-and-loathing1.jpg"}

Branches are different containers of code - they don't impact each other. This means that you can make them for features, for trying something out, for releases etc

git branch breakallthethings
git checkout breakallthethings

Make your changes {data-background="http://www.caribflame.com/wp-content/uploads/2016/03/obama-change-1.jpg"}

State your business {data-background="http://crooksandliars.com/files/primary_image/14/12/respectcartman.jpg"}

Tell git which bits of code you're happy* with.

git add iLoveCursors.sql

* For various definitions of happy

Commit your code {data-background="http://lovelace-media.imgix.net/uploads/299/94220ab0-fcee-0132-451e-0a2ca390b447.jpg?"}

Confirm your changes and tell your local git that you're happy with them

git commit -m "I loves me some cursors"

Merge your code {data-background="http://aksports.com/wp-content/uploads/2014/09/merge-sign.jpg"}

Super happy with your? Publish it to the master branch

git checkout master
git merge breakallthethings -m "I didn't break all the things"

Push your code {data-background="http://i.perezhilton.com/wp-content/uploads/2014/11/salt-n-pepa-push-it-commercial.gif"}

Put new code on the remote location

git push

Git moah things

Git model

git model via \@cthydng

Git resources

Git remotes

Git clients

Git advice

Follow up with me



stephlocke/Rtraining documentation built on May 30, 2019, 3:36 p.m.