* publish since current state?
@ 2008-11-16 20:42 Gennady Kushnir
2008-11-17 7:21 ` Andreas Ericsson
0 siblings, 1 reply; 4+ messages in thread
From: Gennady Kushnir @ 2008-11-16 20:42 UTC (permalink / raw)
To: git
Hello list.
I'm going to publish my work into online public repository.
I have several months of previous history in my local git repo. And I
don't want to make it all public.
Is it possible to publish just a shallow copy of my repository storing
my current tree?
I'd also like to keep my local history private but push new commits
from it into that online repo.
Gennady
P.S. please reply to my email directly as I'm not signed up to mail list yet.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: publish since current state?
2008-11-16 20:42 publish since current state? Gennady Kushnir
@ 2008-11-17 7:21 ` Andreas Ericsson
2008-11-17 10:52 ` Gennady Kushnir
0 siblings, 1 reply; 4+ messages in thread
From: Andreas Ericsson @ 2008-11-17 7:21 UTC (permalink / raw)
To: Gennady Kushnir; +Cc: git
Gennady Kushnir wrote:
> Hello list.
> I'm going to publish my work into online public repository.
> I have several months of previous history in my local git repo. And I
> don't want to make it all public.
> Is it possible to publish just a shallow copy of my repository storing
> my current tree?
Yes. Look for 'grafts' in the documentation. You'll have to create a
new repository containing only the most recent code first, and then
create the grafts-file in that repository and copy the object database
from the old repository into the new one.
> I'd also like to keep my local history private but push new commits
> from it into that online repo.
>
The grafts solution will work like that, assuming you don't publish
your grafts-file.
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: publish since current state?
2008-11-17 7:21 ` Andreas Ericsson
@ 2008-11-17 10:52 ` Gennady Kushnir
2008-11-17 11:44 ` Andreas Ericsson
0 siblings, 1 reply; 4+ messages in thread
From: Gennady Kushnir @ 2008-11-17 10:52 UTC (permalink / raw)
To: Andreas Ericsson; +Cc: git
Thank your for your reply.
But I could not find documentation for grafts... it is only mentioned
in glossary.
The only thing I found with google is 1-year-old a mail list post
http://marc.info/?l=git&m=119636089519572&w=2
could you point out some direct link to grafts documentation?
And also - what you mean by "copy the object database
from the old repository into the new one" ?
I'm not aware of such operation. What command does it?
And will not that copied database go online as dangling objects?
Gennady Kushnir
2008/11/17 Andreas Ericsson <ae@op5.se>:
> Gennady Kushnir wrote:
>>
>> Hello list.
>> I'm going to publish my work into online public repository.
>> I have several months of previous history in my local git repo. And I
>> don't want to make it all public.
>> Is it possible to publish just a shallow copy of my repository storing
>> my current tree?
>
> Yes. Look for 'grafts' in the documentation. You'll have to create a
> new repository containing only the most recent code first, and then
> create the grafts-file in that repository and copy the object database
> from the old repository into the new one.
>
>> I'd also like to keep my local history private but push new commits
>> from it into that online repo.
>>
>
> The grafts solution will work like that, assuming you don't publish
> your grafts-file.
>
> --
> Andreas Ericsson andreas.ericsson@op5.se
> OP5 AB www.op5.se
> Tel: +46 8-230225 Fax: +46 8-230231
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: publish since current state?
2008-11-17 10:52 ` Gennady Kushnir
@ 2008-11-17 11:44 ` Andreas Ericsson
0 siblings, 0 replies; 4+ messages in thread
From: Andreas Ericsson @ 2008-11-17 11:44 UTC (permalink / raw)
To: Gennady Kushnir; +Cc: git
Gennady Kushnir wrote:
> Thank your for your reply.
> But I could not find documentation for grafts... it is only mentioned
> in glossary.
> The only thing I found with google is 1-year-old a mail list post
> http://marc.info/?l=git&m=119636089519572&w=2
> could you point out some direct link to grafts documentation?
>
>From that link can be gleaned the important stuff, actually.
--8<--8<--
Graft points are configured via the .git/info/grafts file. It has one
record per line describing a commit and its fake parents by listing
object names separated by a space and terminated by a newline.
<commit sha1> <parent sha1> [<parent sha1>]*
--8<--8<--
> And also - what you mean by "copy the object database
> from the old repository into the new one" ?
I mean something like this:
cd old_repo && git repack -a -d && \
cp .git/objects/pack/* ../new_repo/.git/objects/pack
cd ../new_repo && \
echo "$first_sha1_of_new_repo $last_sha1_of_old_repo" \
> .git/info/grafts
and you're done.
> I'm not aware of such operation. What command does it?
> And will not that copied database go online as dangling objects?
>
No. The grafts file will connect the two histories so they
look like one. The public repo where people clone from should
not have the grafts-file, and you should run "git repack -a -d"
in that repository to prevent dumb commit walkers from getting
access to all your ancient history through a mega-pack.
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-11-17 11:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-16 20:42 publish since current state? Gennady Kushnir
2008-11-17 7:21 ` Andreas Ericsson
2008-11-17 10:52 ` Gennady Kushnir
2008-11-17 11:44 ` Andreas Ericsson
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).