Difference between revisions of "Installing Git"
(→Direct installation) |
|||
Line 1: | Line 1: | ||
− | '''''[[Introduction to Git|Previous]] | [[First-time Git setup|Next]] | [[Guide to using Git with GEOS-Chem]] | [[Getting Started with GEOS-Chem]] | [[Main Page|GEOS-Chem Main Page]]''''' | + | __FORCETOC__ |
+ | '''''[[Introduction to Git|Previous]] | [[First-time Git setup|Next]] | [[Guide to using Git with GEOS-Chem]] | [[Getting Started with GEOS-Chem]] | [[Main Page|GEOS-[[Media:Example.ogg]]Chem Main Page]]''''' | ||
+ | |||
+ | #[[Introduction to Git]] | ||
+ | #<span style="color:blue">'''Installing Git'''</span> | ||
+ | #[[First-time Git setup]] | ||
+ | #[[Cloning (i.e. downloading for the first time)]] | ||
+ | #[[Ignoring files]] | ||
+ | #[[Viewing the revision history]] | ||
+ | #[[Using Git GUI]] | ||
+ | #[[Branching]] | ||
+ | #[[Committing]] | ||
+ | #[[Tagging]] | ||
+ | #[[Merging]] | ||
+ | #[[Receiving updates (aka pulling)]] | ||
+ | #[[Using patches to share your updates with others]] | ||
+ | #[[Git and Github tutorials]] | ||
+ | |||
== First, check if Git is already installed == | == First, check if Git is already installed == |
Revision as of 17:09, 21 June 2019
Previous | Next | Guide to using Git with GEOS-Chem | Getting Started with GEOS-Chem | [[Main Page|GEOS-Media:Example.oggChem Main Page]]
- 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
- Branching
- Committing
- Tagging
- Merging
- Receiving updates (aka pulling)
- Using patches to share your updates with others
- Git and Github tutorials
Contents
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:
git --version
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:
git --version
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
Direct installation
Please see this web page for more information about how to install Git directly from the source code:
--Bob Yantosca (talk) 14:19, 19 June 2019 (UTC)
Previous | Next | Guide to using Git with GEOS-Chem | Getting Started with GEOS-Chem | GEOS-Chem Main Page