Skip to content

Contributing code to KVIrc's repositories

Benjamin Staneck edited this page Apr 10, 2018 · 5 revisions

Introduction

KVIrc and related projects (KVIrc website, KVIrc themes and KVIrc scripts) now all use GitHub for development, i.e. for source maintenance, pull requests and the review of such code.
Not familiar with Git? Start by looking at GitHub's collaborating pages.

The pull request process is important, especially the code submission part, KVIrc uses the automatic travis and AppVeyor build systems to compile the pull request and allows the person(s) involved the time to make any improvements or fix any issues arising before the pr is merged into the main source tree. It also allows any interested KVIrc development Team members the opportunity to provide feedback and guidance where needed.

General guidelines for creating pull requests:
  • Create topic branches. Don't ask us to pull from your master branch.
  • One pull request per feature. If you want to do more than one thing, send multiple pull requests.
  • Send coherent history. Make sure each individual commit message in your pull request is meaningful.
    If you had to make multiple intermediate commits while developing, please squash them before sending them to us.
    In the end before merging you may be asked to squash your commit even some more.
Try to follow these guidelines; it's the best way to get your work included in the project!
  • Click to fork the application repo.
  • Click to fork the themes repo.
  • Click to fork the scripts repo.
  • Click to fork the website repo.
  • Configure the remote.

Clone your fork of your chosen project repo you did above into the current directory in terminal.
# the example below uses the main repo, please adapt it to match the repo you have forked.
$ git clone git@github.com:<your GitHub username>/KVIrc.git my-kvirc
# Navigate to the newly cloned directory
$ cd my-kvirc 
# Assign the original repo to a remote called e.g. "upstream"
$ git remote add upstream https://github.com/kvirc/KVIrc.git
If you cloned/forked a while ago, get the latest changes from upstream:
# Make sure you are on your 'master' branch
$ git checkout master
# Fetch upstream changes and rebase
$ git pull --rebase upstream master
# Push those changes to GitHub
$ git push -f
Create a new topic branch to contain your feature, change, or fix:
$ git checkout -b <topic-branch-name>
Commit your changes in logical chunks, or your pull request is unlikely to be merged into the main project.

Use Git's interactive rebase feature to tidy up your commits before making them public.

Push your topic branch up to your fork:
$ git push origin <topic-branch-name>
Open a pull request with a clear title and description.
If your revise your pull request or need to keep it synced/rebased with upstream do:
# Fetch upstream changes and rebase and push changes automatically updating the pull request.
$ git pull --rebase upstream master
# Resolve any conflicts, then push those changes to your open PR
$ git push -f