git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Using git-replace in place of grafts -- and publishing .git/refs/replace between repos?
@ 2012-09-15 12:02 David Chanters
  2012-09-15 17:21 ` Junio C Hamano
  0 siblings, 1 reply; 5+ messages in thread
From: David Chanters @ 2012-09-15 12:02 UTC (permalink / raw)
  To: git

Hi,

Earlier this month I asked how best to handle two branches without a
common ancestor to sync changes from one branch to another.  Initially
I did this via the grafts mechanism, but this wasn't a "shared"
solution, in that the graft was local to my checkout of the repository
and no one else's.

I read on StackOverflow that git-replace can be used instead.  Having read this:

http://stackoverflow.com/questions/3810348/setting-git-parent-pointer-to-a-different-parent

I followed the instructions to use git-replace.  Have successfully
done that, I was then able to merge the two branches which didn't have
a common ancestor and have the correct commits on the branch I was
hoping for.  AFAIAC, this worked fine.

But now I have some questions:

1.  I thought the replace data in .git/refs/replace was published when
I did "git push" so that others could use this information as a
base-point, yet it seems not to be the case.  How do I publish this?
2.  If I do publish it, are there any caveats with that?  i.e.,
because the replace data will likely point to a repo which in my
working checkout I added with "git-remote", is that going to be a
problem?  I assume I can instruct people who care, to "git remote add
foo ...." and then treat master and foo/master as intended?  i.e.,
foo/master will see commits on it over time which "master" won't have,
so "git checkout master && git merge foo/master" can always happen?
3.  If it is possible to publish this replace data, is there anything
which needs to happen in .git/config either on the bare repo or local
checkouts?

What I'm aiming for now, in publishing this merge, is that if I can
publish the replace data, that people besides me, can clone the repo,
and the remote repo in place, and merge the branches as outlined in
question 2.   What I also am unsure of is whether or not I have to
keep updating the replace refs each time I merge the branch?

TIA!

David

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-09-16  6:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-15 12:02 Using git-replace in place of grafts -- and publishing .git/refs/replace between repos? David Chanters
2012-09-15 17:21 ` Junio C Hamano
2012-09-15 21:49   ` David Chanters
2012-09-16  2:42     ` Christian Couder
2012-09-16  6:04     ` 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).