The intended audience for this post is rather specific: Game-Off, Game On, Global Game Jam and other game jam particpants. Actually, anyone interested in using GitHub to host both their games’ source code and the playable version may be interested.
If you’re going to follow along with this micro tutorial, I’m assuming the following:
- You have installed Git
- You have a GitHub account; (you can sign up for a free account)
Level 1: Forking
Let’s begin with forking that repository now.
Level 2: Cloning
Next, clone the repository that you’ve just forked (replace leereilly with your username obviously):
$ git clone https://github.com/leereilly/Coil.git Cloning into 'Coil'... remote: Counting objects: 37, done. remote: Compressing objects: 100% (26/26), done. remote: Total 37 (delta 11), reused 35 (delta 9) Unpacking objects: 100% (37/37), done.
Level 3: Playing
If you open the index.html file you should be able to play the game locally.
$ cd Coil/ $ open index.html
Level 4: Pushing
To host the game on GitHub you’ll need to create a branch called gh-pages.
$ git co -b gh-pages Switched to a new branch 'gh-pages' $ git push origin gh-pages Total 0 (delta 0), reused 0 (delta 0) To https://github.com/leereilly/Coil.git * [new branch] gh-pages -> gh-pages
Within a few minutes your game will be available at http://leereilly.github.com/Coil. Again, replace leereilly with your username.
Level 5: Custom Domain Names
Games Hosted on GitHub
Here are a couple of random #ggo12 games that are using GitHub for version control and hosting: