- Introduction to Git
- Installing Git
- First-time Git setup
- Cloning (i.e. downloading for the first time)
- Ignoring files
- Viewing the revision history
- Using Git GUI
- Receiving updates (aka pulling)
- Using patches to share your updates with others
- Advanced Git usage
- Git and Github tutorials
First, check if Git is already installed
If you are using GEOS-Chem on a shared computer cluster, then your IT staff will have probably installed Git for you.
To check if it is already installed, you can ask for the version at the Unix prompt. Type:
If you get a string similar to:
git version 2.17.0
then Git is ready to use.
Check if you need to load a Git module
If your system uses the Lmod module manager, then you first might have to load the Git module. For example, on the Harvard Odyssey cluster, the following command will load Git:
module load git/2.17.0-fasrc01
(The module name on your system will of course differ.) After loading the git module, type:
And you should see this string:
git version 2.17.0
which indicates that Git is ready for use.
Installing Git on your own
There are several ways that you can install Git.
On Fedora Linux
If you have super-user privileges, you can use the dnf package manager to install Git and all of its utilities as follows:
sudo dnf install git-all
On Ubuntu Linux
If you have super-user privileges, you can use the apt package manager to install Git and all of its utilities as follows:
sudo apt install git-all
Using the Spack package manager
You can use the Spack package manager to download and build Git for your system. Please see our Using Spack to install netCDF on your system wiki page for instructions on how to download and install Spack.
Once you have installed Spack you can type:
spack install git
Please see this web page for more information about how to install Git directly from the source code: