Getting source code with Git

On this page... (hide)

  1.   1.  Introduction
  2.   2.  LyX Git Repository
  3.   3.  Trac source browser
  4.   4.  Anonymous Git clone
  5.   5.  After the first download
  6.   6.  Compiling the source
  7.   7.  Changing the source
  8.   8.  Write access via ssh
  9.   9.  Git Branches

1.  Introduction

Git allows multiple people to work on code development at one time. You can get a lot more information on Git and/or download the code from its home page.

For more detailed usage with LyX (or in case you want to start work on the code) please have a look at our wiki pages.

There are still few active modules which use old SVN, you can look here.

2.  LyX Git Repository

lyxgit
This repository hosts the LyX source code. The development of the forthcoming major release takes place in master branch and the minor (maintenance) releases are prepared in branches like 2.0.2. The forthcoming stable version resides in the most recent branch 2.0.x. Due to the old habits we sometimes call master branch trunk and maintenance branch simply as branch.

You must use the "Visit" pull-down menu to select the branch that you wish to browse.

3.  Trac source browser

Using Git, you can download a whole repository with just one command. If you want to look at just one Git file, consider using Trac source browser. Trac is a tool that allows, among other things, for browsing an Git repository and gives the possibility to browse diffs between arbitrary versions as well as reading log files and the like.

The Trac source browser for the LyX Git (and older SVN) repository is at the LyX home page. Most probably, though, you want to download a Git repository. If so, read on.

4.  Anonymous Git clone

From within the directory where you want to place your local copy of the sources, do:

 git clone git://git.lyx.org/lyx

This will make a directory lyx and download lots of files into that directory. (A fresh copy will need about 300MB. However, you will need a lot more space for the compiled version -- up to 1 GB).

You can switch to maintenance branch via git checkout 2.0.x inside the lyx directory.

5.  After the first download

If the code is updated, just cd to the lyx directory and say:

 git pull

This will magically download or patch only those files which have been changed or added, saving you (and the server) lots of time.

If you just want to check what's changed in your local copy as opposed to the repository, do:

 git status

6.  Compiling the source

If you want to compile and run the development version, things are somewhat more complicated than for the downloaded tarballs, because you will need additional packages like automake, autoconf and gettext.

In Linux just follow the directions in INSTALL (this is pretty much like the usual ./autogen.sh, ./configure, make, and make install).

Alternatively consult INSTALL.Win32/MacOSX instructions.


7.  Changing the source

We strongly support any creative impulses you may have. Bug fixes, documentation, and new features will always be looked at carefully, and will usually be accepted, with a number of exceptions. New features will rarely be accepted for the stable release version.

If you'd like to make changes to LyX, it will make everyone's life easier if you change the latest Git sources rather than the latest release. Here's a quick rundown of what you would do:

  • Get the latest version of the source with git pull. A patch to old sources will be much harder to apply, and is therefore more likely to be ignored.
  • Change the files.
  • Run git diff > mypatch.diff to create a patch.
  • send the patch to the LyX developers' mailing list.

8.  Write access via ssh

If you find yourself creating lots of patches that the LyX team incorporates into the code, you may be granted Git access. In that case, your life becomes even easier. More detailed info is in our wiki.

The non-wiki content of the LyX Home Page (e.g. the news and the announcements) and dictionaries/thesauri is still under Subversion tracking.

9.  Git Branches

The main development in LyX is done in Git branches. If you are interested in helping with development or test work on these branches, you can check out a copy with a command like:

 git checkout 2.0.x

or

 git checkout master

on already cloned repository.

Branch NameRelease ManagerMaintainerStatusComment
master (trunk)VF Ravesteijn unstableMaster Branch
branch 2.0.xP SandaRG HeckstableStable 2.0 series branch

There are also some older obsolete branches:

Branch NameRelease ManagerMaintainerStatusComment
BRANCH_1_6_XJMatosJSpitzmstableStable 1.6 series
BRANCH_1_5_XJMatosJSpitzmstableStable 1.5 series
BRANCH_1_4_XLGBjønnesJMarcstableStable 1.4 series
BRANCH_1_3_X JMarcstableStable 1.3 series
BRANCH-1_2_XLGBjønnesJMarcstableStable 1.2 series
BRANCH_1_1_6 JMarcstableStabilizing of 1.1.6