Git configuration and environment - adcroft/MOM6-examples GitHub Wiki

git configuration and environment

git is the SCM (source code management) system of choice and the code is hosted on GitHub. To contribute, you need to have an account on GitHub and have uploaded some ssh keys so that git can "talk" to GitHub. See GitHub's tutorial on generating ssh keys. You do not need a GitHub account to use git to clone (download) from GitHub.

git version

It is helpful to have a recent version of git. Some features such as sub-modules are relatively new. GitHub recommend to use at least version 1.7.10. Use

git --version

to find out what version you have. These instructions on this wiki have been tested with `git --version`` 1.7.10.4.

Your environment

First be sure you have access to git. On the gaea machine you might need to do:

module load git

Your git configuration

Be sure that you have configured git correctly. You only have to do this once ever per platform. You must let git know your full name and email as they should appear in commits and requests:

git config --global user.name "Robert Griffies"
git config --global user.email "[email protected]"

Tip

Turn on "colors" in git for with:

git config --global color.ui true

Choose tkdiff for difftool and avoid prompts:

git config --global diff.tool tkdiff
git config --global difftool.prompt false

Now return to Getting Started.