-
Notifications
You must be signed in to change notification settings - Fork 111
Contributing
Thank you for wanting to contribute to Torque 2D! Please see the following for more information:
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:
- Log into your account at GarageGames.com.
- Go to your account settings page.
- Review the Open Source Sotware Agreement on that page and fill in the required fields.
- 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.
- Click on one of the three radio button choices at the bottom of the section.
- 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.
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.
To start using the development branch you will need to create your own fork of the repository:
- Create your own fork of the Torque 2D repository by using the Fork button on GitHub.
- Clone your Torque 2D fork to your computer.
- Check out the development branch from the Git command line:
git checkout development
- Add an upstream remote:
git remote add upstream https://github.com/TorqueGameEngines/Torque2D.git
To pull changes from the TorqueGameEngines/Torque2D development branch into your developer fork: git pull upstream development
To create a pull request you'll need to create a branch that is an exact copy of the TorqueGameEngines/development branch. Then cherry pick your commits into this new branch before making the pull request. Here's the steps you'll need (using TorqueGameEnginesas the upstream).
- Create a new branch that is a duplicate of GG development branch
git checkout -b YOUR_NEW_BRANCH TorqueGameEngines/development
- 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. - Push the new branch to your remote fork
git push origin YOUR_NEW_BRANCH:YOUR_NEW_BRANCH
- Switch back to your development branch
git checkout development
- Create the pull request using the GitHub website. It should use YOUR_NEW_BRANCH as the source (head fork on the right) and the TorqueGameEngines/development branch as the destination (base fork on the left).