Installing Git: Difference between revisions

From Geos-chem
Jump to navigation Jump to search
No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
__FORCETOC__
__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|Previous]] | [[First-time Git setup|Next]] | [[Guide to using Git with GEOS-Chem]]'''''


#[[Introduction to Git]]
#[[Introduction to Git]]
Line 15: Line 15:
#[[Receiving updates (aka pulling)]]
#[[Receiving updates (aka pulling)]]
#[[Using patches to share your updates with others]]
#[[Using patches to share your updates with others]]
#[[Advanced Git usage]]
#[[Git and Github tutorials]]
#[[Git and Github tutorials]]


Line 76: 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]] | [[Getting Started with GEOS-Chem]] | [[Main Page|GEOS-Chem Main Page]]'''''
'''''[[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

  1. Introduction to Git
  2. Installing Git
  3. First-time Git setup
  4. Cloning (i.e. downloading for the first time)
  5. Ignoring files
  6. Viewing the revision history
  7. Using Git GUI
  8. Branching
  9. Committing
  10. Tagging
  11. Merging
  12. Receiving updates (aka pulling)
  13. Using patches to share your updates with others
  14. Advanced Git usage
  15. 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)


Previous | Next | Guide to using Git with GEOS-Chem