Skip to content
This repository has been archived by the owner on Oct 4, 2019. It is now read-only.

Contribute_EN

DrClockwork edited this page Jul 12, 2017 · 1 revision

How to contribute

Git

To contribute to the H5PP plugin you will need to follow a few steps :

Before development

  • Create a fork of this project on github (You can click to the 'Fork' button at the top right of the repository page).
  • Create a directory that will contain your work. On this directory make a git clone from your recently created fork.
git clone https://github.com/NewContributor/H5PP.git
  • Create a remote to synchronize your fork with the original repository.
git remote add original https://github.com/DrClockwork/H5PP
  • Check with git remote -v. You should see two remote address : origin (your fork) and original (original repository).
  • You have now your repository synchronized with the official repository of H5PP. If you want to contribute everything must happen on the development branch (dev).
git fetch original
git checkout --track original/dev

Development model

Development cannot be done directly on the master branch of the project. When you want to add or adapt a new feature it will be necessary to create your own branch from the development branch. Your branch will follow the following pattern :

<git_login>/feature-<name_of_your_feature>

For example :

DrClockwork/feature-adapt_new_crazy_feature

When it is a bugfix it's the same process :

<git_login>/bugfix-<name_of_your_bugfix>

To create your own branch follow these steps :

git checkout -b <your_branch>            #Create your branch
git push original <your_branch>          #Push your branch on the original repository

When you feel you have completed your development you can make a pull request to the dev branch of the original repository on github.

Pull Request

  • On the main page of H5PP repository go to "Pull requests".
  • Click on "New pull request". Here are merges between the branches of the repository. But, in our case we want to offer merges coming from our repository. Click on the link "compare accross forks".
  • Four fields must be completed :
    • base fork : original repository (DrClockwork/H5PP)
    • base : where you want to merge (dev, master merge are reserved for release preparations. A pull request in master will automatically be denied.)
    • head fork : your repository (fork)
    • compare : the branch you want to merge (gitcontributor/feature-new_feature for example)
  • Finish by clicking on "Create pull request".

This will make a merge request that will be processed by the repository owners. Do not hesitate to comment your pull request to describe the additions / modifications / bugfix made and their objectives !

When your pull request is validated and integrated into the development branch you can now update your repository :

git checkout original dev
git pull
Clone this wiki locally