1

I have a GitHub project which does the same thing (a simple RogueLike game demo, an @ moving around a hardcoded map) in several different languages:

I plan to make it more sophisticated and add the same new functionality to each implementation in delimited steps.

  1. As simple as I could make it
  2. Naive OO (where appropriate for the language...)
  3. Simple map generator rather than hardcoded
  4. Etc. more steps here

The intent is also to be able to do things like allow people to be able to contribute an implementation in a different languages for any of the steps if they wish/improve an implementation etc., but looking at the docs I should be able to figure out how to merge these back in/use pull requests

Now, given all that, my main question is, for each step should I fork or branch the project?

Also, is it possible to have git keep a local copy of each branch? Because it seems that it just keeps the branch you're working on at the moment and there's a lot of fiddling around to sync them back and forward... or maybe that's just because I'm new to git and github and not completely comfortable with all the commands yet. Or is it because I should be forking rather than branching? I tried doing a branch to start doing stage 2 and there was a lot of fiddling around when trying to change my local copy between the 2 branches...

Please be gentle with me, I'm new to git/GitHub, and I have tried Googling and searching StackOverflow but I'm not really sure what I'm looking for.

Kevin Panko
  • 8,356
  • 19
  • 50
  • 61
nrkn
  • 1,752
  • 3
  • 15
  • 24

1 Answers1

2

You have to fork the project.

Forking means: cloning on the GitHub side, which allows you to have your very own code base for the SimpleRL project (to which you cannot push directly, because you aren't one of the direct contributors)

With a fork, you will be able to:

  • clone it locally and make any branch you want to isolate your refactoring/enhancements
  • push any of those branch back to your SimpleRL fork on GitHub (ensuring that others can see those new features and clone/test them themselves)
  • update your fork with any evolution from the initial SimpleRL repo (you will need to add it as a remote).
  • contribute back through pull request, provided your new code isn' too much different from the original one. This is not mandatory. If your evolutions are both massive and better, your fork on GitHub could end up being the new default reference for the SimpleRL project.
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • 2
    And this, ladies and gentlemen, is my **4000th answer** on SO! (in 29 months, which isn't very fast...). Here were my [3000th answer](http://stackoverflow.com/questions/3074816#3074849), my [2000th answer](http://stackoverflow.com/questions/2027649##2027976) and my [1000th answer](http://stackoverflow.com/questions/665239#665252). – VonC Feb 10 '11 at 05:24