Skip to content

threedaymonk/otb-academy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

On The Beach Academy

Dependencies

Setup

Clone this repository:

$ git clone https://github.com/threedaymonk/otb-academy.git

Change directories so that you're in the project:

$ cd otb-academy

Exercises

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

Git: Troubleshooting / Recovery

Throw it all away

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.

Did you commit to master by mistake?

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages