Category Archives: Git & GitHub learning

Documents about my journey to understand Git & GitHub

My Rails Learning Journey – “Breakable Toy” #2 – Blackjack in Rails – 02 Jan 2014

So I have wrapped up, for now, writing a Blackjack game in Ruby. It is pretty basic and runs in the console.

The Github repo for this version is at


Next I am going to try to build a Blackjack game in Rails. I don't think this kind of app is a good fit for Rails however I am going to give it a shot. Ultimately every app, challenge, etc is going to help me grow my understanding of Ruby, Rails, Git, etc.

My Github Learning Journey – Set Up Remote Github Repo for my Ruby Blackjack Game – 26 Dec 2013


I am building a Blackjack Game in Ruby. Eventually I want it to be a Rails app but for now I am just building the logic in Ruby and storing them in the app/ruby folder of a vanilla Rails file structure.


I am hopeless with Github. I find it really confusing. This is how I have set up a remote repo on my Github account to version control the source code of this app as I progress.

I have already gone way further than I should have before setting up a repo but I have been focussing on learning & practising the Ruby for the last few days.


Starting in the root of the rails app. The folder is called blackjack   

    git init

    git add .

    git commit -m "setting up remote repo for my Blackjack app

Went to my Git Hub account ( and set up a new repo called blackjack-game. Checked the box to add a file and added some notes. This means I will need to pull and merge the remote repo with my blackjack folder (master branch) before I try to push to the remote repo.

git remote add origin

git remote -v
      origin (fetch)
      origin (push)
git push -u origin master

You should be all set.


Note: See this Stack Overflow question for details of what the "-u" switch above does?