2.1 Using lily-git

Install and Configuration

  1. If you haven’t already, download and install Git.
  2. Download the lily-git script from:
    http://git.sv.gnu.org/cgit/lilypond.git/plain/scripts/auxiliar/lily-git.tcl
    
  3. To run the program from the command line, navigate to the directory containing ‘lily-git.tcl’ and enter:
    wish lily-git.tcl
    

1. Get source / Update source

When you click the “Get source” button, lily-git will create a directory called ‘lilypond-git/’ within your home directory, and will download the source code into that directory (around 55Mb). When the process is finished, the “Command output” window will display “Done”, and the button label will change to say “Update source”.

Navigate to the ‘lilypond-git/’ directory to view the source files. You should now be able to modify the source files using your normal text editor.

Advanced note: The “Get source” button does not fetch the entire history of the git repository, so utilities like gitk will only be able to display the most recent additions. As you continue to work with lily-git, the “Update source” button will take any new additions and add it to whatever is currently in your repository’s history.

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 your first 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. See Commits and patches for more information regarding commits and commit messages.

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

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 that 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 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:

0001-CG-add-lily-git-instructions.patch
Done.

Send patch files to your mentor if you have one. Otherwise, write an email (must be less than 64 KB) to lilypond-devel@gnu.org briefly explaining your work, with the patch files attached. Translators should send patches to translations@lilynet.net.

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