Tools - Git

Git Links

Installing Git

A developer learning to use eg/git should first review these slides from TUG 2009. The slides cover the basic set up for using eg/git, and provide a nice translation of CVS command to eg commands on slide 18.

To install git on your machine, see the Install eg/git link. After expanding the tarball, be sure to review the README file.

To get started with git, just install eg/git on your machine with the script as:

   $ SOME_BASE_DIR/ --do-all \
   $ export PATH=SOME_DIR/bin:$PATH

Once you have installed eg/git, you should do some configuration:

    $ eg config --global "Your Name"
    $ eg config --global
    $ eg config --global color.ui true

One should consider creating a script to automate the setup of git on a new machine for example as shown at:

    $ ./sampleScripts/git-profiles/

NOTE: Some useful eg log aliases can be installed using the command:

    $ ./commonTools/git/

Some of the useful aliases installed include eg log-oneline, eg log-short, eg log-local and eg local-stat (see the file ~/.gitconfig for the other alias installed).

Using Git

Once you have installed and configured git, you are ready to clone the Trilinos git repository with:

   $ eg clone

You can then change code, build, etc.

To ease the transition to git, you can use the script described here to do all of the actions needed for a safe bullet-proof commit and push (i.e. no staging area issues, no "non-fast forward" error messages, and no merge commits to deal with).

A few notes:

  • The easiest way to get the new repository is: eg clone
  • The documentation for git can be found here (eg/git cheat sheet).
  • Please do the initial setup described in the "Initial Setup" section of here so that your name and email are correct for commits.
  • To merge changes that you may have in existing CVS projects (taken from page 7 of this presentation):
    • Download: scp .
    • From within a clone of the Trilinos git repository, run: /path/to/Trilinos/cvs/checkout
  • The remaining Trilinos repositories such as TrilinosWeb, TrilinosData, etc. have not been converted to git yet and are still CVS repositories.

If you have issues, comments, concerns please send them to Brent ( and cc the Trilinos Framework list (