- git (windows, mac os x: using brew, linux: probably apt-get or yum git-core)
- You will need a modern version of ruby (2.0 or greater)
Clone this repository:
$ git clone https://github.com/threedaymonk/otb-academy.git
Change directories so that you're in the project:
$ cd otb-academy
The classes will consist of various exercises. Each exercise will be in a subfolder of this directory, and should contain a README with more information.
During the class we will from time to time update the master
branch with new
exercises or progress. So while we work on an exercise, you should make periodic
commits saving your work, but DO NOT commit any changes to the master
branch,
instead work in your own local branches.
So if we are working on the bottles
you would
$ git checkout master
Create a new branch to keep your work on the exercise
$ git checkout -b my-bottles-working
Change to the bottles
directory and work on the problem
$ cd bottles
When you want to save your work, stage and commit changes:
$ git add . # the dot is important
$ git commit -m "Explain your change"
When we start working on a new exercise - or are moving forwards with this problem, save your work as about, and then switch back to master.
$ git checkout master
Pull the latest version from GitHub:
$ git pull origin
Then create another new branch to work on the next thing:
$ git checkout -b my-bottles-working-2
If you have gone down a blind alley, and you just want to start over, git makes it easy to clean up and start again.
First of all make sure git knows about all of your files:
$ git add .
Then throw away the changes:
$ git reset --hard HEAD
You will find you are back at clean directory, where you last committed.
Make a branch to keep all your changes:
git branch my-working-branch
Make sure you've got the latest version 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