You will need to install git.

There is a Debian package called git-core that you can install if you use Debian or Ubuntu. If you are using Windows, then visit Mac OS X users may visit Otherwise, visit and download the latest source.

Shared project repo

If you are a developer that is registered with the Emacs project on Savannah, you will want to do the following, replacing loginname with your Savannah login name.

git clone ssh://

Note that this will not work until you have added your SSH key to Savannah.

If you do not have developer access but wish to track the latest development changes, do one of the following instead. If you are behind a restrictive firewall, use the second method; otherwise, use the first method.


git clone git://


git clone

Picking a branch

To see a list of the available branches, run the following command in the checked out copy of Emacs

git branch -r

Here is a description of the available branches.

HEADThe branch you are currently on
masterMain development branch
emacsNNEmacs stable branch for major version ‘NN’

If you want to browse the available branches via the web, visit;a=summary.

The default branch that you get when cloning the ERC project is master.

To see which branch you are currently on, do:

git branch

To check out a branch, do the following. This changes the contents of the current directory to match that branch, rather than creating a new directory.

git checkout [branch name]

For the shared branch, this would be the following.

git checkout master

Using the archive

Keeping up-to-date

To keep up-to-date on the latest ERC happenings, run git’s pull command from the directory that contains your copy of ERC.

git pull origin

This will update Emacs, taking care to preserve any changes that you have checked in to your local copy.

Telling git your name

If you have made some changes that you would like to commit to the ERC project, first you will need to provide a name and email address. This information is used in the change log for each change you commit. To do this, edit the .gitconfig file in your home directory to include the following contents.

        name = Your Name Goes Here
        email =

Now you are ready to make the change log, and then commit. Read on for the change log instructions before doing the commit.

Committing changes

If you wish to commit just a few files that you have changed, instead of all the files that you have changed, then do the following.

git add changed-file-1
git add changed-file-2
git commit

If you instead wish to commit all changes in one go, then do:

git commit -a

In both cases, git will open an editor that you can use to make a log message. Add a brief one-line description of your changes at the top of the file.

The rest of the file (keeping a blank line after the very first line) is for describing your changes in detail. Include your ChangeLog formatted entry here. The information you use here will appear in the erc-commit mailing list when you are done, once you have either pushed your changes or a developer has committed a patch that you have sent.

Here is one example of an acceptable commit log.

erc-track: Allow switching to buffer with most important message type first

* erc-track.el (erc-track-switch-direction): Add 'importance option.
  (erc-modified-channels-display): If erc-track-switch-direction is
  'importance, call erc-track-sort-by-importance.
  (erc-track-face-priority): New function that returns a number
  indicating the position of a face in erc-track-faces-priority-list.
  (erc-track-sort-by-importance): New function that sorts
  erc-modified-channels-list according to erc-track-face-priority.
  (erc-track-get-active-buffer): Make 'oldest a rough opposite of

* NEWS: Mention this change.

Giving changes back

If you have changes that you have committed to ERC, they are only local to your copy of ERC so far. If you want to share them, you must either push them back to the shared repo, or email them to the erc-discuss AT mailing list.

If you have developer access to the shared archive, you can push changes back by doing:

git push origin

If you do not yet have developer access, read on.

You may send your changes via email by doing:

git format-patch -M origin

and then sending the generated patch files to the emacs-devel mailing list. Be sure to describe your changes and include a ChangeLog entry in the commit message for them.

If you want to send the resulting patches from the commandline, rather than opening up an email client, you can do the following, where PATCH-FILE is the file that git format-patch made:

git send-email --to PATCH-FILE

Becoming an Emacs Developer

If you want commit access to the shared Emacs repository on Savannah, It would be best to send some patches to the emacs-devel AT mailing list first, so that we know that you know what you are doing. Register an account at (be sure to add an SSH key), browse to the Emacs project at, and request to be added to the group.

You must also be willing to sign a copyright assignment for your changes to Emacs, since ERC is a part of the GNU/Emacs project. The current maintainer ( or l3thal on #erc@freenode ) will assist you in this process if you contact him.

Emacs modes, Tutorials, and Documentation

DVC (see DistributedVersionControl) is a highly-recommended Emacs add-on that allows you to see changes that you have made, log messages, and (eventually) merging changes easily between branches.

Alternatively, the recent versions of Emacs should include some regular VC bindings for git, so that you can use the same key-bindings that you would use for CVS.

git’s documentation may be browsed at the git website. There has been a significant effort since March 2007 to make the documentation more thorough and easy to read. Several tutorials are there, as well as a User’s Manual.