From: Brian Foster <brian.foster@innova-card.com>
To: git mailing list <git@vger.kernel.org>
Subject: [Q] `git push', branch management, and "(forced update)"?
Date: Wed, 24 Jun 2009 10:34:18 +0200 [thread overview]
Message-ID: <200906241034.18550.brian.foster@innova-card.com> (raw)
Hello,
A colleague of mine will be asking for my help when he
returns later this week, and I'm not too certain what's
going on. My instant reaction is what he's doing may not
be a good idea (an example of rebasing a branch that others
pull, which I understand should be avoided). However, I'm
not a gitpert, and am also sufficiently confused it's worth
asking for help/advice. My apologies for the length....
What we have is four (4) repositories, L, B, R, and M:
L is my colleague's (local) working repository.
B is a bare repository.
R is one (or more?) remote repositories.
M is a bare repository.
The model is work is done in R, patches are sent (by e-mail)
to my colleague, who applies them to L, often does some fixes
(in L), pushes the resultant applied-patch-plus-fixes to B;
and R pulls every now and then from B. The cycle repeats.
(M, as such, does not enter the picture at this point.)
More specifically, what my colleague does (I think, I may
not have this completely correct) is apply the patches to
a topic branch TOPIC. His fixes are separate commits, also
on TOPIC, so (in theory) TOPIC grows in a nice linear manner
(`r' came from R via e-mail, `f' is a local fix):
o--o--o--o master
\
r--r--f--f TOPIC
L is a clone of M, where other work has also been committed,
in master. So now-and-then my colleague pulls M into L:
o--o--o--o--*--* master
\
r--r--f--f TOPIC
My colleague then pushes the result to B. End result is B
is essentially M plus TOPIC.
As it happens (mostly by design), the changes on TOPIC
are independent of the `*' ones on master. So, working
in L, my colleague often rebases, and this is (always?)
a fast-forward:
o--o--o--o--*--* master
\
r--r--f--f TOPIC
He now wants to push that structure to B, so that R can
later pull the updated world. Based on some experiments,
he does (in L):
$ git checkout master
$ git push --tags ssh://.../B.git +:
(I'm not sure why he is using `--tags', or `+:' instead
of a simple `:') but reports what happens is the `push'
gets the error(?):
fatal: remote part of refspec is not a valid name in +:
Given that `git help push' (1.6.2.2) lists/describes the
`+:' <refspec>, I'm (extra) baffled. What's going on?
Each of the repositories L, B, R, and M are on different
machines, and it is highly probable different versions of
git are being used.
In a simple simulation test I tried, it not only worked
for me, but the subsequent pull from simulated-B into
simulated-R said the TOPIC was a "(forced update)".
What does that mean?
And what is it my colleague should consider doing (or,
reading?)?
Again, apologies for the length!
cheers,
-blf-
--
“How many surrealists does it take to | Brian Foster
change a lightbulb? Three. One calms | somewhere in south of France
the warthog, and two fill the bathtub | Stop E$$o (ExxonMobil)!
with brightly-coloured machine tools.” | http://www.stopesso.com
next reply other threads:[~2009-06-24 8:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-24 8:34 Brian Foster [this message]
2009-06-24 16:31 ` [Q] `git push', branch management, and "(forced update)"? 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=200906241034.18550.brian.foster@innova-card.com \
--to=brian.foster@innova-card.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