Kokua:Source Code

There are several ways to get the Kokua Viewer source code.

Downloading from GitHub with a web browser
If you just want to quickly get the latest Kokua source code, the simplest way is to download it from GitHub with a web browser.

The official Kokua repository is available here:


 * kokua/kokua

To download the source code, click on the large "Downloads" button on the right side, then click "Download .zip" (or "Download .tar.gz", for advanced users). For convenience, you can click this link to do the same thing:


 * kokua/kokua dev branch zip

That will download the source code from the "dev" branch (the default), which contains the in-progress source code for the next non-experimental version of Kokua. There are also other branches available, which contain the Kokua source code at various stages of development:


 * exp: in-progress source code for the next experimental version.
 * release: finished source code for the most recently released non-experimental version, including betas and release candidates.
 * stable: finished source code for the most recent full release, not including betas or release candidates.

You can find a full list of all the available branches by clicking on the "Branch List" link on GitHub, or by moving your mouse over the "Switch Branches" pull-down menu.

In addition to the official repository, the personal repositories of all Kokua team members and many contributors are also available on GitHub. You can visit any of these repositories to download their source code in the same way as from the official repository:


 * Members of the kokua network

Cloning the Git repository
If you want to contribute to Kokua, or want easy access to the whole repository history, you should clone the Kokua repository (i.e. download a copy to your computer).

First, read our Git Primer for general information about installing Git, cloning a repository, switching branches, etc.

The git clone URL for the official Kokua repository is: https://github.com/kokua/kokua.git (or alternatively git://github.com/kokua/kokua.git). If you are using Git from the command line, you can run this command to clone the repository:

git clone https://github.com/kokua/kokua.git

If you have signed up for GitHub and "forked" the official repository, you should clone your own fork instead (replace with your GitHub user name):

git clone git@github.com: /kokua.git

There are also several personal repositories of team members and contributors, which may contain commits that have not yet been merged into the official repository. You can add those repositories as additional "remote repositories", so that you can fetch and merge commits from them.

To add a remote repository from the command line, use the "git remote add " command; replace with a label of your choosing (usually the repository owner's user name), and replace with the repository clone URL. You can find the clone URL for each repository by visiting its web page on GitHub, and looking for "HTTP" and "Git Read-Only". You can click either of those to display the "https://" or "git://" variants of the repository clone URL (either one will work).

For example, to add Jacek's repository, run this command:

git remote add jacek https://github.com/jacek/kokua.git

You can then fetch commits from that repository with the "git fetch jacek" command, or fetch commits from all remote repositories (that you have added) with the "git fetch --all" command. (If you have an old version of Git, use "git remote update" instead of "git fetch --all"). To keep up to date with the latest commits, you should run "git fetch --all" from time to time.

Once you have fetched from a remote repository, you can get a list of the remote branches you have fetched, using the "git branch -r" command ("r" stands for "remote"). The list will look something like this:

jacek/dev jacek/exp jacek/release jacek/stable origin/dev origin/exp origin/release origin/stable

The branches starting with "origin/" were fetched from the repository you cloned the first time (usually either the official repository or your personal fork). The branches starting with "jacek/" were fetched from the "jacek" repository. If you have added other remote repositories and fetched from them, branches from those repositories will be listed too.

You can work with remote branches just like any other branch, for example viewing the branch's log or merging it:

git log jacek/dev git merge jacek/dev

Don't forget to run "git fetch --all" from time to time (e.g. daily, or whenever someone tells you they have pushed a new commit) to keep up to date with the latest commits from the remote repositories. You won't be able to see other people's new commits until you fetch them.