From: Junio C Hamano <gitster@pobox.com>
To: "Jean-Noël Avila" <avila.jn@gmail.com>
Cc: git <git@vger.kernel.org>
Subject: Re: Tagging a branch as "not fitted for branching" ?
Date: Tue, 29 Apr 2014 10:43:24 -0700 [thread overview]
Message-ID: <xmqqeh0gkp4z.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <535F56A2.9020900@gmail.com> ("Jean-Noël Avila"'s message of "Tue, 29 Apr 2014 09:37:06 +0200")
Jean-Noël Avila <avila.jn@gmail.com> writes:
> .... In your daily management of the pu
> branch for git, do you have to use the -f flag a lot?
During the day I prepare and validate all the branches I am going to
publish, and at the end of the day, I run "git push" (no options)
with something like this in my .git/config:
[remote "origin"]
url = k.org:/pub/scm/git/git.git
fetch = +refs/heads/*:refs/remotes/origin/*
push = heads/master
push = heads/next
push = +heads/pu
push = heads/maint
I may be on any branch (not one of these four branches) when I need
to run "git push" before I ran out of the office to catch my bus, so
these explicit "which branches are to be pushed" configuration that
does not change what is pushed based on the current branch is
perfect match for *my* workflow. I know 'pu' is always forced, so a
single "+" in front of only that one would allow me to rely on the
fast-forward safety for other branches to stop me from rewinding
them.
I could be also using the --force-with-lease support to validate
that the current value of 'pu' matches what I expect with versions
of Git post 1.8.5, but I happen to be the only person who publishes
there, so there is no need for an extra safety.
If it were not for +heads/pu thing, I could even have relied on the
"matching" mode, because these four branches are the only ones I
have there, and most of the local branches I have do not have any
reason to be on that remote repository.
I should caution that the use of "matching" mode or the explicit
"remote.*.push" specifications are not suitable for non-maintainer
workflows, though. As most of the people are non-maintainers, we
are switching the default to upcoming Git 2.0 release.
prev parent reply other threads:[~2014-04-29 17:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-28 12:09 Tagging a branch as "not fitted for branching" ? Jean-Noël Avila
2014-04-28 23:34 ` Junio C Hamano
2014-04-29 7:37 ` Jean-Noël Avila
2014-04-29 17:43 ` Junio C Hamano [this message]
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=xmqqeh0gkp4z.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=avila.jn@gmail.com \
--cc=git@vger.kernel.org \
/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).