Skip to content
colonelfazackerley edited this page Jan 13, 2016 · 8 revisions

To contribute something (code, graphics, animations, music, levels, ...) it is helpful if you can use a Github pull request. You are asking for your work to be pulled into the project. In git all repositories are equally capable entities, but we do assign purposes to them.

  • Create a Github account. (Mine is colonelfazackerley, as you will see in the examples).
  • Go to the rabbit escape pages and click "fork". This makes a copy of the repository under your account. Soon (wait for it) you will have a working copy of the repository on your own computer. As far as your working repository is concerned your Github fork is called "origin".
  • Go to your rabbit escape fork on github. Mine is https://github.com/colonelfazackerley/rabbit-escape. Find the clone URL and copy it. Then clone. This makes a directory called rabbit-escape and puts all the source in it I will call this a working copy. For me this is
git clone https://github.com/colonelfazackerley/rabbit-escape.git
  • Now you are ready to make the changes to demonstrate your great new idea. Create a branch called "genius". From a directory under rabbit-escape.
git checkout -b genius
  • Start messing with the code/graphics etc. When this is done you should commit the changes to your branch, in your working copy. There are a few things you should do before committing to check.
    make clean slowtest
    git status This will show you which files have been changed/added/deleted
    git add -i A text UI to interactively choose what to add. Called staging for the commit
    git diff Shows you the changes line-by-line between what has been committed (HEAD) and what has been changed (excluding files that have been staged)
    git commit -m "A description of the change" Commit the staged files.
  • When you have done a little work, it is a good idea to back it up. This sends the new branch ("genius") to your Github fork ("origin"). The -u links your local working copy of the branch to the branch on your fork: the local branch is set to track origin/genius.
    git push -u origin genius
  • Do some more work and commit it. Be sure to keep checking status and diffs. To backup more work, due to the tracking, you just need to do git push to send the extra commits.
  • When the work of genius is ready (just after the last push), go to the rabbit-escape code page. It notices your recent push, and puts up a handy button to create the pull request. Review diffs again, type in some description and create the request.
Clone this wiki locally