Skip to content

Latest commit

 

History

History
131 lines (103 loc) · 9.46 KB

CONTRIBUTING.md

File metadata and controls

131 lines (103 loc) · 9.46 KB

Contributing to Project 16x16

Welcome to project 16x16! 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 Project 16x16, 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.

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.

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://github.com/your-github-username/Project-16x16/ a valid url could be: https://github.com/Noodleman123/Project-16x16/
  4. Execute cd Project-16x16 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://github.com/your-github-username/Project-16x16/
cd Project-16x16
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 Project-16x16,
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 Project-16x16 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 project 16x16 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 Stephcraft/Project-16x16. 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 🎉🎉