Skip to content

Contributing

Peter Robinson edited this page Nov 14, 2015 · 2 revisions

Torque Logo

Thank you for wanting to contribute to Torque 2D! Please see the following for more information:

Open Source Software Agreement

Before contributing to the Torque 2D code base we require that you sign the Open Source Software Agreement on the GarageGames site. This agreement is designed to protect the integrity of the Torque 2D project as well as GarageGames LLC. This is a common practice with large scale open source projects such as those under the Apache Software Foundation (individual and corporate) and Oracle.

To sign the Open Source Software Agreement please follow these steps:

  1. Log into your account at GarageGames.com.
  2. Go to your account settings page.
  3. Review the Open Source Sotware Agreement on that page and fill in the required fields.
  4. While optional, it would be great if you also filled in your GitHub account name so we have a quick reference to who has already signed the agreement.
  5. Click on one of the three radio button choices at the bottom of the section.
  6. Click on the Save button at the bottom of the settings screen.

It is important to note that once you have accepted the agreement it is not possible to make any changes to the information you have entered. Unfortunately, this also means your GitHub account name at this time, although it will be moved to a separate section in the future. For now, double check that you have entered it correctly before clicking on the Save button.

Branches

There are two branches: master and development. The master branch contains the current stable version of Torque 2D. The development branch is where all work is done prior to it being moved to the master branch as determined by the Steering Committee.

Using the development branch

To start using the development branch you will need to create your own fork of the repository:

  1. Create your own fork of the Torque 2D repository by using the Fork button on GitHub.
  2. Clone your Torque 2D fork to your computer.
  3. Check out the development branch from the Git command line: git checkout development
  4. Add an upstream remote: git remote add upstream https://github.com/GarageGames/Torque2D.git

To pull changes from the GarageGames/Torque2D development branch into your developer fork: git pull upstream development

Creating a new branch for a pull request

To create a pull request you'll need to create a branch that is an exact copy of the GarageGames/development branch. Then cherry pick your commits into this new branch before making the pull request. Here's the steps you'll need (using GarageGames as the upstream).

  1. Create a new branch that is a duplicate of GG development branch git checkout -b YOUR_NEW_BRANCH GarageGames/development
  2. Cherry pick the commit that you want to create the pull request for git cherry-pick SHA_OR_NAME_OF_COMMIT. You can do this multiple times for multiple commits.
  3. Push the new branch to your remote fork git push origin YOUR_NEW_BRANCH:YOUR_NEW_BRANCH
  4. Switch back to your development branch git checkout development
  5. Create the pull request using the GitHub website. It should use YOUR_NEW_BRANCH as the source (head fork on the right) and the GarageGames/development branch as the destination (base fork on the left).