Difference between revisions of "Tagging"

From Geos-chem
Jump to: navigation, search
(Create at tag using Gitk)
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''''[[Committing|Previous]] | [[Merging|Next]] | [[Guide to using Git with GEOS-Chem]] | [[Getting Started with GEOS-Chem]] | [[Main Page|GEOS-Chem Main Page]]'''''
+
__FORCETOC__
 +
'''''[[Committing|Previous]] | [[Merging|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]]
 +
#<span style="color:blue">'''Tagging'''</span>
 +
#[[Merging]]
 +
#[[Receiving updates (aka pulling)]]
 +
#[[Using patches to share your updates with others]]
 +
#[[Advanced Git usage]]
 +
#[[Git and Github tutorials]]
 +
 
  
 
== Overview ==
 
== Overview ==
Line 6: Line 24:
 
== Tagging ==
 
== Tagging ==
  
Git allows you to tag a particular commit with an alphanumeric string for easy reference.  This tag can be used with ''git pull''', '''git checkout''', etc. commands in the same way as for branches.
+
Git allows you to tag a particular commit with an alphanumeric string for easy reference.  This tag can be used with '''git pull''', '''git checkout''', etc. commands in the same way as for branches.
  
 
Each commit corresponding to a GEOS-Chem version release is tagged with the [[GEOS-Chem version numbering system|version number]] (e.g. 12.3.2).
 
Each commit corresponding to a GEOS-Chem version release is tagged with the [[GEOS-Chem version numbering system|version number]] (e.g. 12.3.2).
  
=== Create at tag using Gitk ===
+
=== Create a tag using Gitk ===
  
 
You may also add a tag via the '''gitk''' viewer utility, as follows:
 
You may also add a tag via the '''gitk''' viewer utility, as follows:
  
1. Start Gitk:
+
(1) '''Start Gitk'''.
  
 
  gitk --all
 
  gitk --all
  
2. Select the commit that you wish to tag by right-clicking on its name with your mouse.  A context menu will appear:
+
(2) '''Select''' the commit that you wish to tag by right-clicking on its name with your mouse.  A context menu will appear:
  
 
[[Image:GitKTagMenu.png]]
 
[[Image:GitKTagMenu.png]]
  
3. Select the '''Create tag''' option.  A dialog box will appear:
+
(3) '''Select''' the '''Create tag''' option.  A dialog box will appear:
  
 
[[Image:GitKCreateTag.png]]
 
[[Image:GitKCreateTag.png]]
  
4. Type the text for your tag the '''Tag name''' box.
+
(4) '''Type the text''' for your tag the '''Tag name''' box.
  
5. Click on '''Create'''.
+
(5) '''Click''' on '''Create'''.  Your tag should appear as a yellow flag in the Gitk revision history window.
  
 
=== Create a tag from the command line ===
 
=== Create a tag from the command line ===
Line 45: Line 63:
  
 
== Further reading ==
 
== Further reading ==
TBD
+
#[https://git-scm.com/docs/git-tag ''Git tag'' (Official Git documentation)]
 +
#[https://blog.daftcode.pl/how-to-become-a-master-of-git-tags-b70fbd9609d9 ''How to become a master of Git tags'' (DaftBlog)]
 +
#[https://stackoverflow.com/questions/18216991/create-a-tag-in-a-github-repository ''Create a tag in a Github repository'' (Stack Overflow)]
 +
 
  
 
----
 
----
'''''[[Committing|Previous]] | [[Merging|Next]] | [[Guide to using Git with GEOS-Chem]] | [[Getting Started with GEOS-Chem]] | [[Main Page|GEOS-Chem Main Page]]'''''
+
'''''[[Committing|Previous]] | [[Merging|Next]] | [[Guide to using Git with GEOS-Chem]]'''''

Latest revision as of 20:28, 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


Overview

On this page, we describe how to add tags to individual commits.

Tagging

Git allows you to tag a particular commit with an alphanumeric string for easy reference. This tag can be used with git pull, git checkout, etc. commands in the same way as for branches.

Each commit corresponding to a GEOS-Chem version release is tagged with the version number (e.g. 12.3.2).

Create a tag using Gitk

You may also add a tag via the gitk viewer utility, as follows:

(1) Start Gitk.

gitk --all

(2) Select the commit that you wish to tag by right-clicking on its name with your mouse. A context menu will appear:

GitKTagMenu.png

(3) Select the Create tag option. A dialog box will appear:

GitKCreateTag.png

(4) Type the text for your tag the Tag name box.

(5) Click on Create. Your tag should appear as a yellow flag in the Gitk revision history window.

Create a tag from the command line

You can add a tag via the command line:

    git tag GEOS-Chem TAG_NAME

That command will create a tag at the current commit.

Removing tags

You can remove a tag via the command line:

git tag -d TAG_NAME

Further reading

  1. Git tag (Official Git documentation)
  2. How to become a master of Git tags (DaftBlog)
  3. Create a tag in a Github repository (Stack Overflow)



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