{"id":30,"date":"2017-01-05T06:42:00","date_gmt":"2017-01-05T06:42:00","guid":{"rendered":"\/colin\/morethanfour\/post\/Tagging-with-Git"},"modified":"2017-01-05T06:42:00","modified_gmt":"2017-01-05T06:42:00","slug":"tagging-with-git","status":"publish","type":"post","link":"https:\/\/spacefold.com\/colin\/morethanfour\/2017\/01\/05\/tagging-with-git\/","title":{"rendered":"Tagging with Git"},"content":{"rendered":"<p>This is newbie-level stuff, but it is new to me&#8230;<\/p>\n<p>When I used TortoiseGit to tag my latest changes, I got a strange error &#8220;Directory C:\\Documents does not exist.&#8221;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"display: inline\" alt=\"image\" src=\"http:\/\/www.spacefold.com\/colin\/morethanfour\/wp-content\/uploads\/image_5.png\" width=\"390\" height=\"139\"><\/p>\n<p>Rather than spend time tracking this down, I decided to bite the bullet and figure out how to use the command line. It&#8217;s not hard (of course), you just have to know and remember.<\/p>\n<p>Reference:<\/p>\n<ul>\n<li><a href=\"https:\/\/git-scm.com\/book\/en\/v2\/Git-Basics-Tagging\">https:\/\/git-scm.com\/book\/en\/v2\/Git-Basics-Tagging<\/a><\/li>\n<\/ul>\n<p>Here&#8217;s what I did: <\/p>\n<p>Change to the project directory: <\/p>\n<div id=\"codeSnippetWrapper\">\n<pre id=\"codeSnippet\" style=\"border-top-style: none; font-size: 8pt; overflow: visible; border-left-style: none; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4\">&gt; cd \\source_control\\ABACAB\\github\\zyxx\\zyxx-db\\master<\/pre>\n<p><\/div>\n<p>Review the current tags (just for fun):<\/p>\n<div id=\"codeSnippetWrapper\">\n<pre id=\"codeSnippet\" style=\"border-top-style: none; font-size: 8pt; overflow: visible; border-left-style: none; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4\">D:\\..\\zyxx-db\\master&gt; git tag<br>20150614_clean_1<br>dev_2015_02_A_1<br>zyxx-1_0_0<br>zyxx-1_0_1<br>zyxx-1_0_2<br>zyxx-41_1-prod<br>zyxx-prod-42<br>:<br>zyxx-prod-50<br>zyxx-prod-54<br>zyxx-uat-20150423<br> <br>D:\\..\\zyxx-db\\master&gt;<\/pre>\n<p><\/div>\n<p>Ah, consistency: the hobgoblin of little minds. Or something like that. <\/p>\n<p>Now create a new annotated tag:<\/p>\n<div id=\"codeSnippetWrapper\">\n<pre id=\"codeSnippet\" style=\"border-top-style: none; font-size: 8pt; overflow: visible; border-left-style: none; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4\">D:\\..\\zyxx-db\\master&gt; git tag -a zyxx-prod-55 -m <span style=\"color: #006080\">\"For Jan 5 2017 deployment to PROD\"<\/span><br>D:\\..\\zyxx-db\\master&gt;<\/pre>\n<p><\/div>\n<p>We have to explicitly push the tag to the remote server:<\/p>\n<div id=\"codeSnippetWrapper\">\n<pre id=\"codeSnippet\" style=\"border-top-style: none; font-size: 8pt; overflow: visible; border-left-style: none; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4\">D:\\..\\zyxx-db\\master&gt; git push origin zyxx-prod-55<br>Counting objects: 1, done.<br>Writing objects: 100% (1\/1), 183 bytes | 0 bytes\/s, done.<br>Total 1 (delta 0), reused 0 (delta 0)<br>To https:\/\/github.abacab.com\/zyxx\/zyxx-db.git<br>* [new tag] zyxx-prod-55 -&gt; zyxx-prod-55<br> <br>D:\\..\\zyxx-db\\master&gt;<\/pre>\n<p><\/div>\n<p>&#8230;and I think that&#8217;s it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is newbie-level stuff, but it is new to me&#8230; When I used TortoiseGit to tag my latest changes, I got a strange error &#8220;Directory C:\\Documents does not exist.&#8221; Rather than spend time tracking this down, I decided to bite the bullet and figure out how to use the command line. It&#8217;s not hard (of [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[],"class_list":["post-30","post","type-post","status-publish","format-standard","hentry","category-source-control","post-preview"],"_links":{"self":[{"href":"https:\/\/spacefold.com\/colin\/morethanfour\/wp-json\/wp\/v2\/posts\/30","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/spacefold.com\/colin\/morethanfour\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/spacefold.com\/colin\/morethanfour\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/spacefold.com\/colin\/morethanfour\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/spacefold.com\/colin\/morethanfour\/wp-json\/wp\/v2\/comments?post=30"}],"version-history":[{"count":0,"href":"https:\/\/spacefold.com\/colin\/morethanfour\/wp-json\/wp\/v2\/posts\/30\/revisions"}],"wp:attachment":[{"href":"https:\/\/spacefold.com\/colin\/morethanfour\/wp-json\/wp\/v2\/media?parent=30"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/spacefold.com\/colin\/morethanfour\/wp-json\/wp\/v2\/categories?post=30"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/spacefold.com\/colin\/morethanfour\/wp-json\/wp\/v2\/tags?post=30"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}