Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Basic GitHub question


Biggerplay
 Share

Recommended Posts

I'm totally new to using something like GitHub, or Phaser or even JS :) ha, so few basic questions.

 

I'm a bit unclear on what is meant on page 5 of downloading phaser, it says instead of just downloading the zip from GitHub you can use an application to get the files. I've got something called SourceTree installed on my Mac, and I've just cloned the phaser repository with that, so is that all correct for me to do so far? reason I ask is because the button at the top of the phaser tutorial mentions something about forking? should I have forked the phaser repository and then cloned the forked version with source tree? or what I've done is fine? I have no need currently to try to change anything with Phaser just want to use as is.

 

If the main branch is updated would source tree automatically update the phaser files or is that something I need to keep an eye on?

Link to comment
Share on other sites

Cloning is the right thing to do, yep, you've done it right. Forking is for when you want to make modifications that might eventually be merged back into the main repository. You'll have to manually update the cloned files from SourceTree.

 

Git (well, source control in general) is an invaluable tool for developers and I really would spend some time getting to know it and how to use it. Here's a good, interactive tutorial: http://try.github.io/levels/1/challenges/1

Link to comment
Share on other sites

You don't need to fork the repository unless you plan on making your own changes directly to it (or submitting patches back to the main repo). Just pulling it down like you've done is absolutely fine. It won't update automatically, you'll have to pull new versions down. So long as you don't change any of the files in your local copy this will be a painless process - if you do change a local file you'll get conflict errors which will need resolving before you can update. So I would suggest for now that you do as you've done, but treat it as a 'master' copy, and copy the phaser files you need out to your own project folders (outside of the repo), then you can edit them without fear of conflicts.

Link to comment
Share on other sites

May I expand on this question?

 

I'm trying to slim down on the amount of files I need to upload to the server, there seems to be a lot in the master repo.  Am I able to put most of these files inside a 'Lib' folder in the root of my host and have my game files outside?

 

Thanks!

 

Ryan

Link to comment
Share on other sites

If you want to take a copy of Phaser to your own repo then all you need is the src folder - (and maybe the build folder, but I suspect you may have your own build process in which case src is all you need. The rest is just lots of examples, docs and a bit of wip stuff.

 

Perfect, thanks for the quick reply, Rich!

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...