2.2 lily-git

The ‘LilyPond Contributor’s Git Interface’ (otherwise known as lily-git.tcl) is a simple-to-use GUI to help you download and update the LilyPond source code as well as an aid to making software patches.

Where to get lily-git

Depending on your development environment, lily-git may already be installed on your computer.

Using lily-git to download the source code

  1. Type the following command into a Terminal:

    You will be prompted to enter a name and email address into the lily-git UI. This information is used to label any patches you create (using the lily-git UI or git via the command line) and can be changed later if required. See Configuring Git.

  2. Click on the Submit button to update lily-git with the information.
  3. Click on the “Get source” button.

    A directory called ‘lilypond-git’ is created within your home directory and the entire source code will start to be downloaded into it.

    Note: Be patient! There is no progress bar in the lily-git UI but the complete source is around 180 MB.

    When the source code has been downloaded, the “command output” window in the lily-git UI will update and display “Done” on the very last line and the button label will change to say “Update source”.

    Note: Some contributors have reported that occasionally nothing happens at this step at all. If this occurs, then try again in a few minutes – it could be an intermittant network problem. If the problem persists, please ask for help.

  4. Close the lily-git GUI and navigate to the ‘lilypond-git’ directory to view and edit the source files.

If this is the first time you will be attempting to compile LilyPond, please see the section Compiling with LilyDev before continuing.

How to use lily-git

Here is a brief description of what each button does in the lily-git UI.

Advanced note: Throughout the rest of this manual, most command-line input should be entered from within the top level of the ‘~/lilypond-git/’ directory. This is known as the top of the source directory and is also referred to as $LILYPOND_GIT as a convention for those users who may have configured their own locations of the LilyPond source code.

Note: For those less experienced contributors using lily-git, we recommend that you only work on one set of changes at a time and not start on any new changes until your first set has been accepted.

1. Update source

Click the “Update source” button to get any recent changes to the source code that have been added by other contributors since your last session.

Note: If another contributor has updated files in the source code that you had been working on then updating your own copy of the source code may result in what is known as a merge conflict. If this occurs, follow the instructions to “Abort changes”, below. Note that your work will not be lost.

2a. New local commit

A single commit typically represents one logical set of related changes (such as a bug-fix), and may incorporate changes to multiple files at the same time.

When you’re finished making the changes for a commit, click the “New local commit” button. This will open the “Git Commit Message” window. The message header is required, and the message body is optional.

After entering a commit message, click “OK” to finalize the commit.

Advanced note: for more information regarding commits and commit messages, see Commits.

2b. Amend previous commit

You can go back and make changes to the most recent commit with the “Amend previous commit” button. This is useful if a mistake is found after you have clicked the “New local commit” button.

To amend the most recent commit, re-edit the source files as needed and then click the “Amend previous commit” button. The earlier version of the commit is not saved, but is replaced by the new one.

Note: This does not update the patch files; if you have a patch file from an earlier version of the commit, you will need to make another patch set when using this feature. The old patch file will not be saved, but will be replaced by the new one after you click on “Make patch set”.

3. Make patch set

Before making a patch set from any commits, you should click the “Update source” button to make sure the commits are based on the most recent remote snapshot.

When you click the “Make patch set” button, lily-git.tcl will produce patch files for any new commits, saving them to the current directory. The command output will display the name of the new patch files near the end of the output:


Send patch files to the appropriate place:

The “Abort changes – Reset to origin” button

Note: Only use this if your local commit history gets hopelessly confused!

The button labeled “Abort changes – Reset to origin” will copy all changed files to a subdirectory of ‘$LILYPOND_GIT’ named ‘aborted_edits/’, and will reset the repository to the current state of the remote repository (at git.sv.gnu.org).

LilyPond — Contributor’s Guide v2.19.82 (development-branch).