git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Question about .git/objects/info/alternates
@ 2010-03-22 17:26 Chris Packham
  2010-03-23  2:42 ` Jonathan Nieder
  0 siblings, 1 reply; 17+ messages in thread
From: Chris Packham @ 2010-03-22 17:26 UTC (permalink / raw)
  To: GIT

Hi All,

I've been using git clone --reference and git submodule update
--reference to reduce the amount of data transferred when I cloned a
repository that I already had an older copy of (that for one reason or
another I didn't want to touch or clone directly).

Now I'm finding that what I really want to do is change around what is
referencing what. I currently have the following.

  projecta.git
  base.git       # references project a
  projectb.git  # referenced base (which, now that I think about it,
was probably the wrong thing to do)

Ideally I'd want to end up with
  base.git      # has all objects
  projecta.git # uses base as a reference
  projectb.git # uses base as a reference also

I would like to have base somehow find the objects it doesn't have in
its object store and either download them or just copy them from the
object store of projecta. Then I can manually point projecta at base
and repack (as discussed in this thread [1]) to free up some space.
projectb should be fine as is because it already references base. Is
there any way to actually do this? A little googling found hints on
adding alternates after the fact but I'm actually interested in going
the other direction. From reading [2] I think 'rm
.git/objects/info/alternates && git repack -a' might do the trick but
I'm not sure.

[1] http://thread.gmane.org/gmane.comp.version-control.git/141161/focus=141199
[2] http://stackoverflow.com/questions/2248228/how-to-detach-alternates-after-git-clone-reference

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

end of thread, other threads:[~2010-03-31  4:35 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-22 17:26 Question about .git/objects/info/alternates Chris Packham
2010-03-23  2:42 ` Jonathan Nieder
2010-03-24 18:53   ` Chris Packham
2010-03-24 19:23     ` Jonathan Nieder
2010-03-24 19:58     ` Junio C Hamano
2010-03-24 20:35       ` Chris Packham
2010-03-25  6:07         ` Chris Packham
2010-03-25  6:07         ` [PATCHv2 1/2] Add git alternate command Chris Packham
2010-03-29  7:32           ` Junio C Hamano
2010-03-31  4:35             ` Chris Packham
2010-03-25  6:07         ` [PATCHv2 2/2] tests for " Chris Packham
2010-03-25  7:38           ` Johannes Sixt
2010-03-25 18:51             ` Chris Packham
2010-03-26  0:48               ` Miklos Vajna
2010-03-26  6:44               ` Johannes Sixt
2010-03-24 20:16     ` Question about .git/objects/info/alternates Stephen Boyd
2010-03-24 20:37       ` Chris Packham

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).