From: Junio C Hamano <junkio@cox.net>
To: "Sean" <seanlkml@sympatico.ca>
Cc: git@vger.kernel.org
Subject: Re: [RFD] what should "git push remote.host:path" do?
Date: Thu, 12 Jan 2006 11:00:18 -0800 [thread overview]
Message-ID: <7v64opp8zh.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: BAYC1-PASMTP099ED34B41FFA02EDEEF25AE270@CEZ.ICE
"Sean" <seanlkml@sympatico.ca> writes:
> What about assuming a refspec of "current-branch:current-branch" ?
> That is, if the branch name that is currently checked out locally
> also exists upstream, push into it (only if fast forward).
>
> This should allow multiple branches to be updated locally, and pushed
> upstream selectively.
Requiring at least one refspec to be given to the command has
the same property. Ways to give refspec to the command are:
(1) give one or more from the command line
(2) give --all from the command line
(3) give none from the command line, but in this case you need
at least one "Push:" the "remotes" file you use.
So it really boils down to "is pushing the current branch a
better default"?
Even if a project uses CVS style shared repository setup,
individual developers would want to use topic branches to
prepare things that they eventually push to the shared common,
and I suspect that it would lead to more mistakes if we default
the push to push the current branch. "Push: master" in the
remotes/ file to publish your results to the shared repository
would be safer; "git push" when you are still in your topic
branch and have not merged things up into your master branch for
publication would be no-op, as opposed to pushing the topic
branch, probably resulting in the topic branch in the shared
repository, even though the topic was meant to be internal to
his repository.
next prev parent reply other threads:[~2006-01-12 19:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-12 9:13 [RFD] what should "git push remote.host:path" do? Junio C Hamano
[not found] ` <56282.10.10.10.28.1137061121.squirrel@linux1>
2006-01-12 10:18 ` Sean
2006-01-12 19:00 ` Junio C Hamano [this message]
2006-01-12 16:31 ` Nick Hengeveld
2006-01-12 18:10 ` Linus Torvalds
2006-01-12 18:53 ` Junio C Hamano
2006-01-13 1:54 ` [PATCH] git-push: avoid falling back on pushing "matching" refs Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7v64opp8zh.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=seanlkml@sympatico.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).