Skip to content
Ivan edited this page Jan 4, 2017 · 15 revisions

[DRAFT] Here some guidelines useful if you want contribute to dreamos:

Creating pull requests

  • Keep Pull Requests as small as possible.
  • Every pull request should contain a single feature, single bug fix, single task, etc. Please avoid to create a big pull request that contains different updates.
  • Give a meaningful title to the pull request, and if there is an issue/task related, please mention it in the description.
  • Never include content of a previous Pull Request into e newer one!

Testing pull requests

If you want to test a pull request (assume that you working on your own fork):

  • (Do it only if you are on your own fork and do it only the very first time for your repository) You must add a new remote that points to the original fork,

    git remote add upstream https://github.com/inuyasha82/DreamOs.git

  • Create a new branch from the pull request:

    git fetch upstream pull/ID/head:branch_name

  • Checkout the new branch:

    git checkout branch_name

  • Test the changes!

  • Once you are happy with your test, you can delete the branch with:

    git branch -d branchname

Work with your branch

Once you have downloaded dreamos sources from git (either from your fork, or the main repo), is strongly suggested to create a new branch for each feature you want to implement.

  • To create a new branch:

    git branch newbranch

  • To checkout files from the branch that you have created (if you create a new branch, git doesn't switch to the new branch automatically, you have to do it manually):

    git checkout newbranch

  • You can use a shortcut command that automatically create and checkout the new branch:

    git checkout -b newbranch

  • If you want to publish your branch on github:

    git push origin newbranch