* How to update the tag to Git server?
@ 2008-12-04 2:16 Gary Yang
2008-12-04 2:35 ` Peter Harris
2008-12-04 2:48 ` Junio C Hamano
0 siblings, 2 replies; 3+ messages in thread
From: Gary Yang @ 2008-12-04 2:16 UTC (permalink / raw)
To: git
I pushed code from my local repository to Git Server.
git push git.company.com:/pub/git/training.git
I, then tagged my local repository.
git tag -u gyang@company.com RELEASE_2
I want to update the Git server so that I can have the tag at my Git server, I did:
git push git.company.com:/pub/git/training.git
Everything up-to-date
I got "Everything up-to-date". Same story for the command with -f.
git push -f svdcgit01.amcc.com:/pub/git/training.git
git tag -l
RELEASE_2
>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?
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to update the tag to Git server?
2008-12-04 2:16 How to update the tag to Git server? Gary Yang
@ 2008-12-04 2:35 ` Peter Harris
2008-12-04 2:48 ` Junio C Hamano
1 sibling, 0 replies; 3+ messages in thread
From: Peter Harris @ 2008-12-04 2:35 UTC (permalink / raw)
To: garyyang6; +Cc: git
On Wed, Dec 3, 2008 at 9:16 PM, Gary Yang wrote:
>
> I pushed code from my local repository to Git Server.
> git push git.company.com:/pub/git/training.git
>
> I, then tagged my local repository.
> git tag -u gyang@company.com RELEASE_2
>
> I want to update the Git server so that I can have the tag at my Git server, I did:
> git push git.company.com:/pub/git/training.git
> Everything up-to-date
Did you try "git push git.company.com:/pub/git/training.git tag
RELEASE_2" or "git push git.company.com:/pub/git/training.git --tags",
as it suggests in "git help push"?
Peter Harris
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to update the tag to Git server?
2008-12-04 2:16 How to update the tag to Git server? Gary Yang
2008-12-04 2:35 ` Peter Harris
@ 2008-12-04 2:48 ` Junio C Hamano
1 sibling, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2008-12-04 2:48 UTC (permalink / raw)
To: garyyang6; +Cc: git
Gary Yang <garyyang6@yahoo.com> writes:
> I pushed code from my local repository to Git Server.
> git push git.company.com:/pub/git/training.git
>
> I, then tagged my local repository.
> git tag -u gyang@company.com RELEASE_2
git-push(1) manual page says that the syntax of the command is:
'git push' [--all | --mirror] [--dry-run] [--tags] [--receive-pack=<git-receive-pack>]
[--repo=<repository>] [-f | --force] [-v | --verbose]
[<repository> <refspec>...]
and its OPTIONS section explains what <refspec> means.
<refspec>...::
The canonical format of a <refspec> parameter is
`+?<src>:<dst>`; that is, an optional plus `{plus}`, followed
by the source ref, followed by a colon `:`, followed by
the destination ref.
...
The <src> side represents the source branch (or arbitrary
"SHA1 expression", such as `master~4` (four parents before the
tip of `master` branch); see linkgit:git-rev-parse[1]) that you
want to push. The <dst> side represents the destination location.
You want to update refs/tags/RELEASE_2 on the destination side (i.e. the
public server) with the same refs/tags/RELEASE_2 on the source side
(i.e. your side), so you would want to say
refs/tags/RELEASE_2:refs/tags/RELEASE_2
for <refspec>. The documentation further mentions that there is a
short-hand for that:
`tag <tag>` means the same as `refs/tags/<tag>:refs/tags/<tag>`.
Hence the command line becomes:
$ git push svdcgit01.amcc.com:/pub/git/training.git tag RELEASE_2
Note that saying "tag" is redundant these days as long as you do not have
a branch named "RELEASE_2" at the same time. But saying "tag" never
hurts, as it is still (and will be) supported.
Note to people who teach git to new people. The moral of the story is not
that people should learn to read the manual pages. It is that people
should not learn "push" without remote nor refspec first. In other words,
the first push command you teach them should be the "git push $over_there
$this_refspec" form, fully spelled.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-12-04 2:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-04 2:16 How to update the tag to Git server? Gary Yang
2008-12-04 2:35 ` Peter Harris
2008-12-04 2:48 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).