Skip to content

Latest commit

 

History

History
136 lines (105 loc) · 9.65 KB

CONTRIBUTING.md

File metadata and controls

136 lines (105 loc) · 9.65 KB

Contributing to Voodoo2D

Welcome to Voodoo2D! If you are new to the GitHub and open source world, we recommend you to take a look at this 10 minute read introduction.

Table Of Contents

  1. Getting the project
  2. Setting up the project
  3. The Process of Making Changes

Getting the project

First, you need to make a copy of this repository to be able to modify it on your side. This is called a fork. To fork Voodoo2D, simply go to the repository page and click on the Fork button located at the top right corner.

Then, you will need to download git. Git is a version-control system for tracking changes in source code. It is used through the command line or third-party software.

Refer to the wiki for full detail on this step.

Make a choice

Here are three options for software to use git. If you want to get started without too much hassle and command lines, then we strongly suggest using GitHub Desktop or Source tree. Otherwise, if you really like command lines, then check out the instructions for git.

If you are using IntelliJ IDEA, however, just make sure you have git installed on your system and follow this guide

git GitHub Desktop Source tree
git GitHub Desktop Source tree

git

You have a fork of the project on your GitHub account (the cloud). Now you need to get a local version on your computer. Here is how to do so:

  1. Open command prompt if you are on Windows or open Terminal if you are on a mac
  2. Navigate to where you want your project to be cloned. In command prompt, type cd directory/to/where/you/want/your/project for example: cd C:/Users/Noodleman123/Desktop/Programming/Java
  3. To clone the project, execute git clone https:/your-github-username/voodoo2d/ a valid url could be: https:/Noodleman123/voodoo2d/
  4. Execute cd voodoo2d to go in the project directory
  5. Execute git checkout master to have the right files, the ones that are being developed.

Here is a summary of all the commands:

cd directory/to/where/you/want/your/project
git clone https:/your-github-username/voodoo2d/
cd voodoo2d
git checkout master

Refresh

Every now and then, it is a good practice to sync your local version to the cloud version origin. This is particularly useful to stay up to date and avoid merge conflicts:

git pull

Save on your local version control (git)

You should execute these 2 commands every time you complete a task:

git add .
git commit -m "a description telling what you modified/added"

The first command adds everything that has been modified to the history of your local version control. The second command will group the changes in a commit with a description.

Save in the cloud (GitHub)

You should save your local work on your forked GitHub when you accomplish something. If your computer breaks, at least your code will be safe in the cloud 👍

git push

That's it for the git setup! Now, you are ready to open up the code editor. Don't forget to come back to this file when you are ready to know about the Process of Making Changes.

GitHub Desktop

Download GitHub Desktop

Step Screenshot
Follow the installation wizard
Click on Clone a repository
from the internet...
Select your fork of voodoo2d,
navigate to where you want the
project to be cloned and Clone
Choose the master branch or the
branch you want to contribute to

Refresh

Every now and then, it is a good practice to sync your local version to the cloud version origin. This is particularly useful to stay up to date and avoid merge conflicts:

Save your contribution

It is recommended to create a commit every time you complete a task:

Step Screenshot
At the bottom left, fill in the summary and
the description box (if necessary).
Then press on commit to master.
This will create a commit in
history on your local computer.
To update your commit to your fork,
simply press on Push origin

That's it for the GitHub Desktop setup! Now, you are ready to open up the code editor. Don't forget to come back to this file when you are ready to know about the Process of Making Changes.

Source tree

Download Source tree

Warning Two-factor authentication is required for your GitHub account to continue...

Step Screenshot
You need to create a Bitbucket Cloud account
to use Source tree. But you have the option
to connect with Google or Microsoft.
Follow the installation wizard
Uncheck Mercurial, we only need git.
Click on Add an account...
Set the hosting service to GitHub,
set the Preferred Protocol to HTTPS,
set Authentication to OAuth,
and click on Refresh OAuth Token
Link your GitHub account to Source tree
Select voodoo2d and click on Clone
Navigate to where you want to clone the project
and Clone

Refresh

Every now and then, it is a good practice to sync your local version to the cloud version origin. This is particularly useful to stay up to date and avoid merge conflicts:

Save your contribution

It is recommended to create a commit every time you complete a task:

Step Screenshot
Add the files you modified to the staged files
by clicking on the plus. Only staged files will
be included in the commit.
Write a description and commit.
This will create a commit in history on your
local computer.
To update your commit to your fork, simply
press on Push

That's it for the Source tree setup! Now, you are ready to open up the code editor. Don't forget to come back to this file when you are ready to know about the Process of Making Changes.

The Process of Making Changes

Issues

You are now ready to contribute! Github represents tasks as issues. You can find all of the issues here or in the Issues tab of the repository. If you found a bug, would like to add a feature or simply do not find something interesting to contribute to, then you can create your own issue.

Pull request

A pull request is the final step to contribute something. A request should be made when you complete a "milestone" or resolve an issue. Here is how to open one:

Step Screenshot
Go to the Voodoo2D GitHub repository and click on Pull requests
Click on the big green Pull request button
Click on compare across forks. The Head repository should be your fork, and the Base should be CremBluRay/voodoo2d. Be sure to choose the right repository and the correct branch which is usually master.
Add a title, a description and tags (if necessary).
Your pull request will be reviewed by a collaborator shortly 🎉🎉