Skip to content
JohannesLorenz edited this page Jan 20, 2014 · 16 revisions

The common way to contribute code to a project on GitHub is by forking it and creating a pull request after the changes are done. This is the workflow we recommend.

If you don't have a GitHub account and don't want to sign up neither, you may just create a patch file and send it to us.

Using GitHub

Add an SSH key

This must be only done once. Follow this tutorial to generate and add SSH keys to your github account.

Fork the official LMMS repository

Do these steps:

  • Go to our github home and hit the fork button (top right).
  • Clone your fork:
$ git clone [email protected]:yourusername/lmms.git

For more instructions on how to fork LMMS, see the GitHub help article Fork A Repo. Having forked LMMS and cloned it to your hard drive, you can start working on the code.

Pushing your changes to GitHub

After you made your changes and implemented your ideas, it's about time to push them to your git repository. For doing this, you may use the command line, as it's explained below, or use git gui to open a graphical user interface, which can make things a lot easier if you're uncomfortable with the command line.

Reviewing your changes

You can list all changed files by running

$ git status

inside the source root directory. A more detailed view on what exactly has been changed is provided by

$ git diff

Staging and committing

The next step is to stage the changes you've made. To stage a file, run

$ git add FILENAME

After that, you have to commit your staged changes. To do so, run

$ git commit

You'll be asked to enter a commit message to summarize what you did. The staging area can also be skipped by just typing

$ git commit -a

This way all changes you made will automatically be staged and committed. Finally, push your commit:

$ git push

Contributing your changes

(TODO: write down what exactly has to be done)

In order for your changes to be merged into the official repository, you should create a pull request. You can find instructions on this topic in GitHubs article Using Pull Requests.

Using only a patch file

To have your changes applied without using GitHub, create a patch file containing your changes by running

$ git diff > my-patch-for-lmms.diff

in the source root directory. Now you have a patch file we can easily apply. Just contact us about it.