Difference between revisions of "Version control with Git"

From Geos-chem
Jump to: navigation, search
(First-time setup)
(Redirected page to Guide to using Git with GEOS-Chem)
 
(29 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Overview ==
+
#REDIRECT [[Guide to using Git with GEOS-Chem]]
 
+
Git is a relatively new version control system.  At present (March 2010), we are considering migrating the GEOS-Chem repository from CVS to Git, for a variety of reasons:
+
 
+
*Git avoids some of the limitations of CVS (which is by now 20-year-old software).
+
*Git is in general much simpler to use than CVS.
+
* With Git, GEOS-Chem developers will be able to:
+
*# Download the most current GEOS-Chem source code online.  (This will obviate the need for having to download the <tt>*.tar.gz</tt> files.)
+
*# Develop and test their source code additions to GEOS-Chem in their own local repository, and 
+
*# Submit their mature source code updates back to the [[GEOS-Chem programming staff|GEOS-Chem Support Team]] for inclusion in the [[GEOS-Chem versions under development|standard mainline code]]
+
 
+
== Tutorials about Git ==
+
 
+
;[http://excess.org/article/2008/07/ogre-git-tutorial/ Git tutorial video]: Excellent lecture given by Bart Trojanowski for the Ottawa Group of Ruby Enthusiasts.  '''''HIGHLY RECOMMENDED!'''''
+
;[http://hoth.entp.com/output/git_for_designers.html Git for Designers]: Nice overview of how version control works.  Recommended for people with no prior experience using a version control system.
+
;[http://www.spheredev.org/wiki/Git_for_the_lazy Git for the Lazy]: This is an excellent Git guide for beginners.  Short, sweet, and to the point.
+
;[http://www.newartisans.com/2008/04/git-from-the-bottom-up.html ''Git From the Bottom Up'' by John Wiegley]: Article which not only describes the commands used to invoke Git but also the design philosophy behind the Git version control system.  Good theoretical background but somewhat terse for beginners to understand.
+
;[http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html Official Git tutorial]: A comprehensive but somehwat terse tutorial of Git commands.
+
;[http://www.kernel.org/pub/software/scm/git/docs/v1.4.4.4/cvs-migration.html Git for CVS Users]: A tutorial specifically geared toward migrating from CVS to Git.
+
;[https://rails.lighthouseapp.com/projects/8994/sending-patches Sending Patches with Git]: A guide how to use the patch feature of Git to send your changes to another user.
+
 
+
== Using Git with GEOS-Chem and GAMAP ==
+
 
+
=== Obtaining and installing Git ===
+
 
+
If you don't already have Git on your system then you (or your sysadmin) will have to install it.  To check if it is already installed, you can ask for the version at the Unix prompt.  Type:
+
 
+
[534 rhea GEOS_5]% git --version
+
 
+
If you get a string similar to:
+
 
+
git version 1.6.6.2
+
 
+
then you are good to go.  (The actual version # doesn't matter.)  If not, then you (or your sysadmin) may obtain the Git source code (or binaries) [http://git-scm.com/download the Git website].
+
 
+
=== First-time setup ===
+
 
+
Before using Git for the first time, you need to set up your <tt>~/.gitconfig</tt> file.  Open a text editor and then cut & paste the text from [http://stackoverflow.com/questions/267761/what-does-your-gitconfig-contain this sample <tt>.gitconfig</tt> file].  Then save it as <tt>~/.gitconfig</tt>. 
+
 
+
Be sure to change your name and email accordingly, this is how Git will know who you are!
+
 
+
Please see the following pages which describe how to download the GEOS-Chem and GAMAP source code packages via Git.
+
 
+
=== Downloading GEOS-Chem and GAMAP ===
+
 
+
Please see the following wiki pages which contain detailed information about how to use Git to download and modify the GEOS-Chem and GAMAP source code packages:
+
 
+
* [[Using Git with GEOS-Chem]]
+
* [[Using Git with GAMAP]]
+
 
+
--[[User:Bmy|Bob Y.]] 09:43, 16 March 2010 (EDT)
+
 
+
== References ==
+
 
+
# [http://git-scm.com/ Git web page]
+
# [http://zrusin.blogspot.com/2007/09/git-cheat-sheet.html Git Cheat Sheet]
+
# Google "Tech Talk" by Linus Torvalds, the creator of Git [http://www.youtube.com/watch?v=4XpnKHJAok8 (Video on Youtube)]
+
# Google "Tech talk" by Randal Schwartz [http://www.youtube.com/watch?v=8dhZ9BXQgc4 (Video on Youtube)]
+
# Setting up your <tt>.gitconfig</tt> file [http://stackoverflow.com/questions/267761/what-does-your-gitconfig-contain (Link)]
+
 
+
--[[User:Bmy|Bob Y.]] 15:41, 9 March 2010 (EST)
+

Latest revision as of 17:26, 21 June 2019