You will need:
- git (windows, mac os x: using brew, linux: probably apt-get or yum git-core)
- a modern version of Ruby (1.9.3 or greater)
Clone this repository:
$ git clone https://github.com/torqueforge/careerbuilder-2014-april.git
Change directories so that you are in the project:
$ cd careerbuilder-2014-april
Install the dependencies:
$ gem install bundler # if you don't have it
$ bundle install
To verify that everything is set up so that we can get off to a flying start, run the following command:
$ ruby sanity_test.rb
You should get an error complaining that cannot load such file -- sanity (LoadError).
For example:
/Users/you/.rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- sanity (LoadError)
from /Users/you/.rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from sanity_test.rb:3:in `<main>'
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
Create a new branch:
$ git checkout -b my-new-branch
When you've gotten your test suite to pass stage all the changes:
$ git add . # notice the dot
Then commit the changes:
$ git commit -m "Explain your change here"
When we start working on a new section, switch back to master:
$ git checkout master
Then pull the latest version from GitHub:
$ git pull origin
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