GIT Workflow

To enable contribution to QGIS from many people working on small pieces of code (e.g. tests, bugs, etc.), we have adopted
a GIT Workflow based on GitHub.

The information on this page is for people new to developing for QGIS. The following steps should initially be taken if you wish to add code.

  1. Get an account on www.GitHub.com This enables you to create your own copy of the source tree.
  2. Create a fork of QGIS source. Click the fork icon on the top right of https://github.com/qgis/Quantum-GIS
  3. Install git on your computer.
  4. Clone your fork to your computer into the current working directory:
     git clone git@github.com:<username>/Quantum-GIS.git
    
  5. Add the original QGIS repo as an upstream remote.
    git remote add upstream git://github.com/qgis/Quantum-GIS.git
    
Now you are ready to start working. Perform the following steps for each new task you start to work on.
  1. Create a topic branch starting with the master branch (never work in the master branch!). Select branch name according to
    what you work on, e.g. an issue in Redmine.
    git checkout master
    git checkout -b issue12345
    
  2. Commit your changes to your local branch and then push them upstream to your branch on Github.
  3. Create a pull request on Github when your code is ready for merge or review. The pull request will automatically update if you push further changes to the branch.