Installing Git: Difference between revisions
No edit summary |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
'''''[[Introduction to Git|Previous]] | [[First-time Git setup|Next]] | [[Guide to using Git with GEOS-Chem]] | __FORCETOC__ | ||
'''''[[Introduction to Git|Previous]] | [[First-time Git setup|Next]] | [[Guide to using Git with GEOS-Chem]]''''' | |||
#[[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]] | |||
#[[Advanced Git usage]] | |||
#[[Git and Github tutorials]] | |||
== First, check if Git is already installed == | == First, check if Git is already installed == | ||
Line 59: | Line 77: | ||
Please see this web page for more information about how to install Git directly from the source code: | Please see this web page for more information about how to install Git directly from the source code: | ||
*https://git-scm.com/book/en/v2/Getting-Started-Installing-Git | *[https://git-scm.com/book/en/v2/Getting-Started-Installing-Git ''Getting started: Installing Git'' (Pro Git book)] | ||
--[[User:Bmy|Bob Yantosca]] ([[User talk:Bmy|talk]]) 14:19, 19 June 2019 (UTC) | --[[User:Bmy|Bob Yantosca]] ([[User talk:Bmy|talk]]) 14:19, 19 June 2019 (UTC) | ||
---- | ---- | ||
'''''[[Introduction to Git|Previous]] | [[First-time Git setup|Next]] | [[Guide to using Git with GEOS-Chem | '''''[[Introduction to Git|Previous]] | [[First-time Git setup|Next]] | [[Guide to using Git with GEOS-Chem]]''''' |
Latest revision as of 20:20, 5 August 2019
Previous | Next | Guide to using Git with GEOS-Chem
- 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
- 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:
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)