Clone this repository:
$ git glone https://github.com/torqueforge/careerbuilder-2014-march.git
Change directories so that you are in the project:
$ cd careerbuilder-2014-march
Install the dependencies:
$ gem install bundler # if you don't have it
$ bundle install
To see what git currently thinks is going on, say:
$ git status
To see which branches you have:
$ git branch
As the class progresses we will add exercises and solutions to the master branch.
Each exercise is in its own subdirectory, and has its own README.
Start on master.
$ git checkout master
If you want to save your work, create a branch from master. You can do this at any time, either when you are starting new work, or right before you want to commit.
$ git checkout -b my-new-branch
When you've gotten your test suite to pass.
You have to tell git which changes you want to commit. To tell git to save everything:
$ git add .
Then commit the changes:
$ git commit -m "Explain your change here"
When you start working on a new section, switch back to master.
$ git checkout master
Then pull the latest changes from GitHub:
$ git pull
Then create a new branch.
Wash. Rinse. Repeat.
You can throw all your code away like this:
First, make sure that git knows all about the files you have:
$ git add .
Then throw the changes away:
$ git reset --hard
Go ahead and create a new branch with all your changes:
$ git checkout -b my-backup-branch
Then go back to master:
$ git checkout master
Make sure you have the most recent changes from GitHub:
$ git fetch origin
Then tell git to create a new copy of master, throwing away the old one:
$ git reset --hard origin/master
- Growing Object-Oriented Software, Guided by Tests - Steve Freeman, Nat Pryce
- Refactoring - From Good to Great by Ben Orenstein (@r00k)
- Source Making - A website about code smells and the refactorings to address them
- GitHug - practical exercises to teach git
- Git Immersion - a guided tour with practice exercises
- Try GitHub - interactive tutorial
- Think Like a Git - explains the philosophy that will make it easier to think about git
- Ruby Koans - test-driven guided tour of Ruby, particularly good for people who already program in other languages.
For all of the following, read the README where there is one. If something is confusing, submit a GitHub issue in the relevant repository. The instructions can probably be improved.
- Fundamental Ruby - exercises that use unit tests and error messages to teach the core and standard libraries
- Enumerable Exercises - exercises for practicing using the (very rich!) enumerable methods in Ruby.
- Unicorn, revisited - intro to Ruby using TDD