@@ -774,6 +774,41 @@ <h2>
774
774
* 17f4acf first commit
775
775
</ pre >
776
776
777
+ < p > Tags pointing to objects tracked from branch heads will be
778
+ automatically downloaded when you < code > fetch</ code > from a remote
779
+ repository. However, tags that aren't reachable from branch heads
780
+ will be skipped. If you want to make sure < em > all</ em > tags are < em > always</ em >
781
+ included, you must include the < code > --tags</ code > option.
782
+ </ p >
783
+
784
+ < pre >
785
+ < b > $ git fetch origin --tags</ b >
786
+ remote: Counting objects: 1832, done.
787
+ remote: Compressing objects: 100% (726/726), done.
788
+ remote: Total 1519 (delta 1000), reused 1202 (delta 764)
789
+ Receiving objects: 100% (1519/1519), 1.30 MiB | 1.21 MiB/s, done.
790
+ Resolving deltas: 100% (1000/1000), completed with 182 local objects.
791
+ From git://github.com:example-user/example-repo
792
+ * [new tag] v1.0 -> v1.0
793
+ * [new tag] v1.1 -> v1.1
794
+ </ pre >
795
+
796
+ < p > If you just want a single tag, use
797
+ < code > git fetch <remote> tag <tag-name> </ code > .
798
+ </ p >
799
+
800
+ < p > By default, tags are not included when you < code > push</ code > to
801
+ a remote repository. In order to explicitly update these you must
802
+ include the < code > --tags</ code > option when using < code > git push</ code > .
803
+ </ p >
804
+
805
+ < p class ="nutshell ">
806
+ < b > In a nutshell</ b > you use < code > git tag</ code > to mark a
807
+ commit or point in your repo as important. This also allows
808
+ you to refer to that commit with a more memorable reference
809
+ than a SHA.
810
+ </ p >
811
+
777
812
</ div >
778
813
</ div >
779
814
0 commit comments