* How can I specify multiple refs on one line in the config file?
@ 2008-05-07 21:15 Steve Hoelzer
2008-05-07 21:33 ` Thomas Adam
2008-05-07 22:28 ` Jeff King
0 siblings, 2 replies; 9+ messages in thread
From: Steve Hoelzer @ 2008-05-07 21:15 UTC (permalink / raw)
To: git mailing list
How can I specify multiple refs on one line in the config file? For
example, I want "git push" to push all heads and all tags by default
so I tried this:
[remote "origin"]
push = refs/heads/* refs/tags/*
That doesn't work, of course, but I imagine it is possible, and I just
can't figure out the syntax.
Thanks,
Steve
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How can I specify multiple refs on one line in the config file?
2008-05-07 21:15 How can I specify multiple refs on one line in the config file? Steve Hoelzer
@ 2008-05-07 21:33 ` Thomas Adam
2008-05-07 22:19 ` Steve Hoelzer
2008-05-07 22:28 ` Jeff King
1 sibling, 1 reply; 9+ messages in thread
From: Thomas Adam @ 2008-05-07 21:33 UTC (permalink / raw)
To: Steve Hoelzer; +Cc: git mailing list
2008/5/7 Steve Hoelzer <shoelzer@gmail.com>:
> How can I specify multiple refs on one line in the config file? For
> example, I want "git push" to push all heads and all tags by default
> so I tried this:
>
> [remote "origin"]
> push = refs/heads/* refs/tags/*
>
> That doesn't work, of course, but I imagine it is possible, and I just
> can't figure out the syntax.
I might be misunderstanding you, but to push tags, there's:
git push --tags
I know that's not inclusive of anything else.
-- Thomas Adam
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How can I specify multiple refs on one line in the config file?
2008-05-07 21:33 ` Thomas Adam
@ 2008-05-07 22:19 ` Steve Hoelzer
2008-05-07 22:27 ` Miklos Vajna
0 siblings, 1 reply; 9+ messages in thread
From: Steve Hoelzer @ 2008-05-07 22:19 UTC (permalink / raw)
To: Thomas Adam; +Cc: git mailing list
On Wed, May 7, 2008 at 4:33 PM, Thomas Adam <thomas.adam22@gmail.com> wrote:
> I might be misunderstanding you, but to push tags, there's:
>
> git push --tags
True, but I only want to type "git push". No, it's not _really_
necessary, but I'd like to set it up that way so I don't have to
depend on my coworkers (new git users) remembering "--tags".
Steve
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How can I specify multiple refs on one line in the config file?
2008-05-07 22:19 ` Steve Hoelzer
@ 2008-05-07 22:27 ` Miklos Vajna
2008-05-07 22:38 ` Thomas Adam
0 siblings, 1 reply; 9+ messages in thread
From: Miklos Vajna @ 2008-05-07 22:27 UTC (permalink / raw)
To: Steve Hoelzer; +Cc: Thomas Adam, git mailing list
[-- Attachment #1: Type: text/plain, Size: 813 bytes --]
On Wed, May 07, 2008 at 05:19:30PM -0500, Steve Hoelzer <shoelzer@gmail.com> wrote:
> On Wed, May 7, 2008 at 4:33 PM, Thomas Adam <thomas.adam22@gmail.com> wrote:
> > I might be misunderstanding you, but to push tags, there's:
> >
> > git push --tags
>
> True, but I only want to type "git push". No, it's not _really_
> necessary, but I'd like to set it up that way so I don't have to
> depend on my coworkers (new git users) remembering "--tags".
are you sure pushing tags by default is a good idea? people regularly
create local tags to mark a commit before a rebase, to mark a commit as
a fix for a given bug, etc. those tags aren't interesting for others.
tags which should be pushed usually rare. then you can use git push
origin tag v1.0, since you know which tag you really want to push.
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How can I specify multiple refs on one line in the config file?
2008-05-07 21:15 How can I specify multiple refs on one line in the config file? Steve Hoelzer
2008-05-07 21:33 ` Thomas Adam
@ 2008-05-07 22:28 ` Jeff King
2008-05-07 22:29 ` Jeff King
1 sibling, 1 reply; 9+ messages in thread
From: Jeff King @ 2008-05-07 22:28 UTC (permalink / raw)
To: Steve Hoelzer; +Cc: git mailing list
On Wed, May 07, 2008 at 04:15:47PM -0500, Steve Hoelzer wrote:
> How can I specify multiple refs on one line in the config file? For
> example, I want "git push" to push all heads and all tags by default
> so I tried this:
>
> [remote "origin"]
> push = refs/heads/* refs/tags/*
>
> That doesn't work, of course, but I imagine it is possible, and I just
> can't figure out the syntax.
I imagine it is possible, too, but not with one line. How about:
[remote "origin"]
push = refs/heads/*:refs/heads/*
push = refs/tags/*:refs/tags/*
-Peff
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How can I specify multiple refs on one line in the config file?
2008-05-07 22:28 ` Jeff King
@ 2008-05-07 22:29 ` Jeff King
2008-05-08 3:32 ` Jeff King
0 siblings, 1 reply; 9+ messages in thread
From: Jeff King @ 2008-05-07 22:29 UTC (permalink / raw)
To: Steve Hoelzer; +Cc: git mailing list
On Wed, May 07, 2008 at 06:28:13PM -0400, Jeff King wrote:
> > [remote "origin"]
> > push = refs/heads/* refs/tags/*
> >
> > That doesn't work, of course, but I imagine it is possible, and I just
> > can't figure out the syntax.
>
> I imagine it is possible, too, but not with one line. How about:
>
> [remote "origin"]
> push = refs/heads/*:refs/heads/*
> push = refs/tags/*:refs/tags/*
Aside: configuring a remote as
[remote "origin"]
push = refs/heads/*
push = refs/tags/*
seems to hang forever. I didn't expect it to _work_, but probably it
should eventually terminate. ;)
-Peff
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How can I specify multiple refs on one line in the config file?
2008-05-07 22:27 ` Miklos Vajna
@ 2008-05-07 22:38 ` Thomas Adam
2008-05-07 23:58 ` Steve Hoelzer
0 siblings, 1 reply; 9+ messages in thread
From: Thomas Adam @ 2008-05-07 22:38 UTC (permalink / raw)
To: Steve Hoelzer, Thomas Adam, git mailing list
2008/5/7 Miklos Vajna <vmiklos@frugalware.org>:
>
> On Wed, May 07, 2008 at 05:19:30PM -0500, Steve Hoelzer <shoelzer@gmail.com> wrote:
> > On Wed, May 7, 2008 at 4:33 PM, Thomas Adam <thomas.adam22@gmail.com> wrote:
> > > I might be misunderstanding you, but to push tags, there's:
> > >
> > > git push --tags
> >
> > True, but I only want to type "git push". No, it's not _really_
> > necessary, but I'd like to set it up that way so I don't have to
> > depend on my coworkers (new git users) remembering "--tags".
>
> are you sure pushing tags by default is a good idea? people regularly
> create local tags to mark a commit before a rebase, to mark a commit as
> a fix for a given bug, etc. those tags aren't interesting for others.
> tags which should be pushed usually rare. then you can use git push
> origin tag v1.0, since you know which tag you really want to push.
Probably not, which is why '--tags' exists in the first place. But
then if you're working from a shared repository (which I am -- as are
many, no doubt in a corporate environment) it's rather useful. I
would find local tags though to be odd.
-- Thomas Adam
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How can I specify multiple refs on one line in the config file?
2008-05-07 22:38 ` Thomas Adam
@ 2008-05-07 23:58 ` Steve Hoelzer
0 siblings, 0 replies; 9+ messages in thread
From: Steve Hoelzer @ 2008-05-07 23:58 UTC (permalink / raw)
To: Thomas Adam; +Cc: git mailing list
On Wed, May 7, 2008 at 5:38 PM, Thomas Adam <thomas.adam22@gmail.com> wrote:
> 2008/5/7 Miklos Vajna <vmiklos@frugalware.org>:
>> are you sure pushing tags by default is a good idea? people regularly
>> create local tags to mark a commit before a rebase, to mark a commit as
>> a fix for a given bug, etc. those tags aren't interesting for others.
>> tags which should be pushed usually rare. then you can use git push
>> origin tag v1.0, since you know which tag you really want to push.
>
> Probably not, which is why '--tags' exists in the first place. But
> then if you're working from a shared repository (which I am -- as are
> many, no doubt in a corporate environment) it's rather useful. I
> would find local tags though to be odd.
That's exactly my use case and why I asked the question.
However, now I'm reconsidering because local tags and branches are a
great feature to show off git. If the default is to push all tags and
branches just like a centralized VCS, it becomes an obstacle to
learning how git does it -- and I think that the more people learn
about git the more they will like it.
Steve
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How can I specify multiple refs on one line in the config file?
2008-05-07 22:29 ` Jeff King
@ 2008-05-08 3:32 ` Jeff King
0 siblings, 0 replies; 9+ messages in thread
From: Jeff King @ 2008-05-08 3:32 UTC (permalink / raw)
To: Steve Hoelzer; +Cc: git mailing list
On Wed, May 07, 2008 at 06:29:47PM -0400, Jeff King wrote:
> Aside: configuring a remote as
>
> [remote "origin"]
> push = refs/heads/*
> push = refs/tags/*
>
> seems to hang forever. I didn't expect it to _work_, but probably it
> should eventually terminate. ;)
Nevermind, this _does_ work. But there seems to be a bug in next that I
was triggering with my test case. I'll send a separate message about it.
-Peff
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-05-08 3:33 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-07 21:15 How can I specify multiple refs on one line in the config file? Steve Hoelzer
2008-05-07 21:33 ` Thomas Adam
2008-05-07 22:19 ` Steve Hoelzer
2008-05-07 22:27 ` Miklos Vajna
2008-05-07 22:38 ` Thomas Adam
2008-05-07 23:58 ` Steve Hoelzer
2008-05-07 22:28 ` Jeff King
2008-05-07 22:29 ` Jeff King
2008-05-08 3:32 ` Jeff King
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).