@git / git-reference / commits / 690a441

Tip about tags not coming down the aisle unless you call for them

Tags are so incidental they are not normally slurped with the usual fetch or push commands. A little heads up. Also adds a nutshell inline with the rest of the cards.

Soon Van committed Dec 18, 2012 at 00:36 UTC 690a441c2558749426962ac6bfe6bb74acb43b2a
1 file changed +29
branching/index.html
+29
@@ -774,6 +774,35 @@ ab5ab4c added erlang
774 * 17f4acf first commit
775 </pre>
776
777 + <p>By default, tags are not included when you <code>push</code> to or
778 + <code>fetch</code> from a remote repository. In order to explicitly
779 + update these you must include the <code>--tags</code> option to transfer
780 + all the tags on the repo.
781 + </p>
782 +
783 +<pre>
784 +<b>$ git fetch origin --tags</b>
785 +remote: Counting objects: 1832, done.
786 +remote: Compressing objects: 100% (726/726), done.
787 +remote: Total 1519 (delta 1000), reused 1202 (delta 764)
788 +Receiving objects: 100% (1519/1519), 1.30 MiB | 1.21 MiB/s, done.
789 +Resolving deltas: 100% (1000/1000), completed with 182 local objects.
790 +From git://github.com:example-user/example-repo
791 + * [new tag] v1.0 -> v1.0
792 + * [new tag] v1.1 -> v1.1
793 +</pre>
794 +
795 + <p>If you just want a single tag, use
796 + <code>git fetch &lt;remote> tag &lt;tag-name></code>.
797 + </p>
798 +
799 + <p class="nutshell">
800 + <b>In a nutshell</b> you use <code>git tag</code> to mark a
801 + commit or point in your repo as important. This also allows
802 + you to refer to that commit with a more memorable reference
803 + than a SHA.
804 + </p>
805 +
806 </div>
807 </div>
808