Skip to content
This repository has been archived by the owner on Mar 5, 2019. It is now read-only.

generalassembly/ga-2015-july

 
 

Repository files navigation

Object-Oriented Design Class

Dependencies

You will need:

Setup

Clone this repository:

$ git clone [email protected]:torqueforge/ga-2015-july.git

Change directories so that you are in the project:

$ cd ga-2015-july

Install the dependencies:

$ gem install bundler # if you don't have it
$ bundle install

Sanity Check Setup

To verify that everything is set up correctly, run the following command:

$ ruby sanity_test.rb

You should see the following output.

$ ruby sanity_test.rb
Run options: --seed 62459

# Running:

.

Finished in 0.001317s, 759.3014 runs/s, 759.3014 assertions/s.

1 runs, 1 assertions, 0 failures, 0 errors, 0 skips

Exercises

Class consists of a number of exercises. Each exercise has its own subdirectory and README.

Working on the exercises

We'll tell you the next exercise to work on (for example, 'house'). Every exercise is in a separate folder. Each exercise folder contains a README which tells you what to do for that specific exercise.

As we work on each exercise, we'll periodically add intermediate solutions to master on github and ask you to pull the code. This means that your life will be easier if you NEVER UPDATE your local MASTER. Instead, it's best to do your work in local branches.

Therefore, to work on the 'house' problem you would

$ git checkout master

Create a new branch to hold your work on this exercise:

$ git checkout -b my-house-branch

Change to the house directory and work on the exercise:

$ cd house

When you want to save your work, stage and commit your changes:

$ git add . # notice the dot
$ git commit -m "Explain your change here"

When we start working on the next section of house (or move to a new exercise altogether) save your outstanding work (as above) 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-house-branch-2 # for the next section of 'house'
$ # or
$ git checkout -b my-bottles-branch # for a new exercise entirely

Git: Troubleshooting / Recovery

Throw it all away?

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

Did your master diverge?

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%