{"thread":{"id":"16591","subject":"How to update the tag to Git server?","startedAt":"2008-12-04T02:16:32Z","lastAt":"2008-12-04T02:48:43Z","messageCount":3,"participants":["Gary Yang","Peter Harris","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"97128","messageId":"84437.20577.qm@web37903.mail.mud.yahoo.com","threadId":"16591","inReplyTo":null,"subject":"How to update the tag to Git server?","fromName":"Gary Yang","fromEmail":"garyyang6@yahoo.com","sentAt":"2008-12-04T02:16:32Z","receivedAt":"2008-12-04T02:16:32Z","isPatch":false,"sender":{"key":"garyyang6@yahoo.com","avatar":null},"body":"\nI pushed code from my local repository to Git Server.\ngit push git.company.com:/pub/git/training.git\n\nI, then tagged my local repository.\ngit tag -u gyang@company.com RELEASE_2\n\nI want to update the Git server so that I can have the tag at my Git server, I did:\ngit push git.company.com:/pub/git/training.git\nEverything up-to-date\n\nI got \"Everything up-to-date\". Same story for the command with -f.\ngit push -f svdcgit01.amcc.com:/pub/git/training.git\n\ngit tag -l\nRELEASE_2\n\n>From my git server, git.company.com, I cannot see the tag at summary. I need to have the tag, RELEASE_2 at git.company.com. Can someone tell me how to do it?\n\nThanks.\n\n\n\n\n\n\n\n      \n"},{"id":"97129","messageId":"eaa105840812031835ofe7d9cck67f4bc58ce5ad0d7@mail.gmail.com","threadId":"16591","inReplyTo":"84437.20577.qm@web37903.mail.mud.yahoo.com","subject":"Re: How to update the tag to Git server?","fromName":"Peter Harris","fromEmail":"git@peter.is-a-geek.org","sentAt":"2008-12-04T02:35:22Z","receivedAt":"2008-12-04T02:35:22Z","isPatch":false,"sender":{"key":"git@peter.is-a-geek.org","avatar":null},"body":"On Wed, Dec 3, 2008 at 9:16 PM, Gary Yang wrote:\n>\n> I pushed code from my local repository to Git Server.\n> git push git.company.com:/pub/git/training.git\n>\n> I, then tagged my local repository.\n> git tag -u gyang@company.com RELEASE_2\n>\n> I want to update the Git server so that I can have the tag at my Git server, I did:\n> git push git.company.com:/pub/git/training.git\n> Everything up-to-date\n\nDid you try \"git push git.company.com:/pub/git/training.git tag\nRELEASE_2\" or \"git push git.company.com:/pub/git/training.git --tags\",\nas it suggests in \"git help push\"?\n\nPeter Harris\n"},{"id":"97130","messageId":"7v1vwo7j04.fsf@gitster.siamese.dyndns.org","threadId":"16591","inReplyTo":"84437.20577.qm@web37903.mail.mud.yahoo.com","subject":"Re: How to update the tag to Git server?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-12-04T02:48:43Z","receivedAt":"2008-12-04T02:48:43Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Gary Yang <garyyang6@yahoo.com> writes:\n\n> I pushed code from my local repository to Git Server.\n> git push git.company.com:/pub/git/training.git\n>\n> I, then tagged my local repository.\n> git tag -u gyang@company.com RELEASE_2\n\ngit-push(1) manual page says that the syntax of the command is:\n\n   'git push' [--all | --mirror] [--dry-run] [--tags] [--receive-pack=<git-receive-pack>]\n              [--repo=<repository>] [-f | --force] [-v | --verbose]\n              [<repository> <refspec>...]\n\nand its OPTIONS section explains what <refspec> means.\n\n<refspec>...::\n\tThe canonical format of a <refspec> parameter is\n\t`+?<src>:<dst>`; that is, an optional plus `{plus}`, followed\n\tby the source ref, followed by a colon `:`, followed by\n\tthe destination ref.\n\t...\n        The <src> side represents the source branch (or arbitrary\n        \"SHA1 expression\", such as `master~4` (four parents before the\n        tip of `master` branch); see linkgit:git-rev-parse[1]) that you\n        want to push.  The <dst> side represents the destination location.\n\nYou want to update refs/tags/RELEASE_2 on the destination side (i.e. the\npublic server) with the same refs/tags/RELEASE_2 on the source side\n(i.e. your side), so you would want to say\n\n\trefs/tags/RELEASE_2:refs/tags/RELEASE_2\n\nfor <refspec>.  The documentation further mentions that there is a\nshort-hand for that:\n\n\t`tag <tag>` means the same as `refs/tags/<tag>:refs/tags/<tag>`.\n\nHence the command line becomes:\n\n    $ git push svdcgit01.amcc.com:/pub/git/training.git tag RELEASE_2\n\nNote that saying \"tag\" is redundant these days as long as you do not have\na branch named \"RELEASE_2\" at the same time.  But saying \"tag\" never\nhurts, as it is still (and will be) supported.\n\nNote to people who teach git to new people.  The moral of the story is not\nthat people should learn to read the manual pages.  It is that people\nshould not learn \"push\" without remote nor refspec first.  In other words,\nthe first push command you teach them should be the \"git push $over_there\n$this_refspec\" form, fully spelled.\n"}]}