cart253-2018

Tools / CART 253 / Fall 2018 / Pippin Barr

Version control


In this module


Why version control?


Git, GitHub, and GitHub Desktop

???


Repositories


Create a cart253-2018 repository


Cloning a repository!


Your local repository


Ready to work!


A version control workflow

The simplest workflow using Git and GitHub is this:

  1. You make some changes to your project in your local folder. Something like an hour’s work, say, reaching some sort of defined goal perhaps. (Mostly in Atom, but also includes adding files, renaming folders, etc.)

  2. You commit your changes to the local repository using GitHub Desktop. This stores this newest version of the project in the repository.

  3. You push your changes to the remote repository on github.com using GitHub Desktop. This makes sure your newest version is also safe in the “cloud”.

So basically you develop a rhythm of doing a chunk of work, committing and pushing it, doing another chunk of work, committing and pushing it, etc.

Let’s try it…


1. Make some changes


## cart253-2018

This is the repository for the course CART 253 for Pippin Barr.
It is going to contain __exciting exercises__, __passionate projects__,
and a __succulent sandbox__.

- [My homepage](https://www.pippinbarr.com/)
- [Twitter](https://www.twitter.com/pippinbarr)
- [Instagram](https://www.instagram.com/pippinbarr)

???


GitHub Desktop knows what you did (last summer)


2. Commit your changes


Committed

???


Push your changes

???


Check GitHub

???


That workflow again

  1. Make changes locally (in your cart253-2018 repository folder)
  2. Commit changes to the local repository with a message (using GitHub Desktop)
  3. Push changes to the remote repository (using GitHub Desktop)

???


“When should I commit?”


Working offline


Working on a different computer


“For I am CDA, destroyer of worlds”

???


Ignorance is bliss


Ignore .DS_Store


Activity

Given that we have done Exercise 0 (RIGHT?) we have a JavaScript project we could put into our repository! So:

  1. Find your Exercise 0 folder and rename it to exercise0
  2. Create a folder called exercises inside your cart253-2018 repository folder
  3. Put the exercise0 folder into the exercises folder
  4. Go to GitHub Desktop and check that it sees the changes
  5. Write a commit message like “Added exercise 0 to the repository”
  6. Commit the changes
  7. Push the changes

(Normally our changes won’t be adding a whole project at once, they’ll be more incremental.)


Summary


Fin.