{"id":1662,"date":"2016-09-26T10:44:25","date_gmt":"2016-09-26T17:44:25","guid":{"rendered":"http:\/\/10kdev.net\/?p=1662"},"modified":"2016-09-27T14:29:23","modified_gmt":"2016-09-27T21:29:23","slug":"git-tag-cleanup-routine","status":"publish","type":"post","link":"http:\/\/10kdev.net\/?p=1662","title":{"rendered":"A Quick Sanity Check: Git Tag Cleanup Routine"},"content":{"rendered":"<p>I mentioned in an earlier post that if you want to <a href=\"http:\/\/10kdev.net\/1649\/git-tags-local-and-remote-be-careful\">move a tag in git<\/a> you have to do a discrete tag delete, push, then re-add the same tag, push. \u00a0Sometimes though there are tags already out of sync in your repo. \u00a0To handle things nicely, first do this routine.<\/p>\n<p>Update your local repos with whatever tags are on the remote.\u00a0 It might not be necessary to do all branches but do the main ones, it&#8217;s quick,\u00a0just to be sure you are synced up. \u00a0I&#8217;ve seen errors in SourceTree that don&#8217;t work that well with git tags so I&#8217;m not too trusting.<\/p>\n<pre style=\"padding-left: 30px;\">git checkout develop\r\n\r\ngit fetch --tags\r\n\r\ngit checkout master\r\n\r\ngit fetch --tags<\/pre>\n<p>Again remember &#8211; if you need to move a tag, delete it, push the change, then recreate it, push the change.\u00a0 Do the changes separately the tag cannot do a compound move (delete\/reassign) in git; and check your remote afterwards.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I mentioned in an earlier post that if you want to move a tag in git you have to do a discrete tag delete, push, then re-add the same tag, push. \u00a0Sometimes though there are tags already out of sync in your repo. \u00a0To handle things nicely, first do this routine. Update your local repos [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[88,3],"tags":[],"_links":{"self":[{"href":"http:\/\/10kdev.net\/index.php?rest_route=\/wp\/v2\/posts\/1662"}],"collection":[{"href":"http:\/\/10kdev.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/10kdev.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/10kdev.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/10kdev.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1662"}],"version-history":[{"count":3,"href":"http:\/\/10kdev.net\/index.php?rest_route=\/wp\/v2\/posts\/1662\/revisions"}],"predecessor-version":[{"id":1665,"href":"http:\/\/10kdev.net\/index.php?rest_route=\/wp\/v2\/posts\/1662\/revisions\/1665"}],"wp:attachment":[{"href":"http:\/\/10kdev.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1662"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/10kdev.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1662"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/10kdev.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1662"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}