Setting Up Git#

To work on the Sage source code, you need

The Tips and References chapter contains further information about git that might be useful to some but are not required.

Installing Git#

First, try git on the command line. Most distributions will have it installed by default if other development tools are installed. If that fails, use the following to install git:

Debian / Ubuntu

sudo apt-get install git-core

Fedora

sudo yum install git-core

Windows (Cygwin)

Install the Cygwin package git. Do not attempt to use native Windows installations of git.

Windows (WSL)

We strongly recommend to install the package using the Linux distribution’s package manager. Native Windows installations of git may also work, but there are possible pitfalls.

macOS

Install the Xcode Command Line Tools.

Some further resources for installation help are:

Your Name and Email#

The commit message of any change contains your name and email address to acknowledge your contribution and to have a point of contact if there are questions in the future; filling it in is required if you want to share your changes. The simplest way to do this is from the command line:

[user@localhost ~] git config --global user.name "Your Name"
[user@localhost ~] git config --global user.email you@yourdomain.example.com

This will write the settings into your git configuration file with your name and email:

[user]
    name = Your Name
    email = you@yourdomain.example.com

Of course you’ll need to replace Your Name and you@yourdomain.example.com with your actual name and email address.