Link Search Menu Expand Document

How-to Contribute


Pull requests should be opened to the develop branch as master is reserved for releases.


Here are the basics of contributing to GitHub:

  1. Fork and clone the project
  2. Set up the project locally
  3. Create an upstream remote and sync your local copy
  4. Branch each set of work
  5. Push the work to your own repository
  6. Create a new pull request
  7. Look out for any code feedback and respond accordingly

We follow Vincent Driessen’s branching model: Git flow and Git Flow Hooks by Jaspern Brouwer. These will be great additions to your environment.

The guide sources are written on Markdown format, taking advantage of Jekyll for GitHub Pages.

While in the development stage, you can live preview your work using the GitHub Pages Ruby Gem.

How to start

  1. fork Kotlin-SCP repository
  2. clone your fork:
    git clone git@github.com:[YOUR-USERNAME]/Kotlin-SCP.git
    
  3. enter your local copy:
    cd kotlin-scp
    
  4. initialize git flow:
    $ git flow init
    
  5. fetch remote branches:
    $ git fetch --all
    

New section / sub-section

Simply put, every time you want to work on a new section, or add a sub-section, you should start a “feature”:

$ git flow feature start my-new-section

To keep your work safe, don’t forget to publish your feature often:

$ git flow feature publish

Typos / Urgent updates

For typos and any other issues that should not wait for the next release to be fixed, you should start a hotfix:

$ git flow hotfix start

Once you’re ready to merge your work with others, you should go to main repository and open a New Pull Request to the develop branch. Then, someone will review your work, comment, request changes, and/or simply merge it to branch develop of the project’s main repository. Hotfixes will be merged both to develop and master branches, making changes immediately available. Features become available on the next release.

Remember to keep master and develop branches of your fork up to date with the upstream ones.

Testing locally

You can do it using the GitHub Pages Ruby Gem: “A simple Ruby Gem to bootstrap dependencies for setting up and maintaining a local Jekyll environment in sync with GitHub Pages.

Provided that Docker is installed, follow the official GitHub Pages Ruby Gem instructions to build the Docker image and run the server.