Skip to content

Commit 690a441

Browse files
committed
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.
1 parent cfb6480 commit 690a441

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

branching/index.html

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -774,6 +774,35 @@ <h2>
774774
* 17f4acf first commit
775775
</pre>
776776

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+
777806
</div>
778807
</div>
779808

0 commit comments

Comments
 (0)