* cvs importing a forked project
@ 2010-10-01 17:38 Eric Frederich
2010-10-01 17:53 ` Ævar Arnfjörð Bjarmason
2010-10-01 17:57 ` Brandon Casey
0 siblings, 2 replies; 7+ messages in thread
From: Eric Frederich @ 2010-10-01 17:38 UTC (permalink / raw)
To: git
Hello,
I have a project (several actually) where development was done in cvs
for 10 years. Then, about 5 years ago, a copy of the latest was made
and development continued in a new project.
Development in the old project stopped for the most part.
Is there any way where I can combine these two projects in git?
Basically, take the newer project's first commit and make its parent
the the last commit of the older project.
Development was pretty linear.
Thanks,
~Eric
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: cvs importing a forked project
2010-10-01 17:38 cvs importing a forked project Eric Frederich
@ 2010-10-01 17:53 ` Ævar Arnfjörð Bjarmason
2010-10-01 17:57 ` Brandon Casey
1 sibling, 0 replies; 7+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-10-01 17:53 UTC (permalink / raw)
To: Eric Frederich; +Cc: git
On Fri, Oct 1, 2010 at 17:38, Eric Frederich <eric.frederich@gmail.com> wrote:
> I have a project (several actually) where development was done in cvs
> for 10 years. Then, about 5 years ago, a copy of the latest was made
> and development continued in a new project.
> Development in the old project stopped for the most part.
>
> Is there any way where I can combine these two projects in git?
> Basically, take the newer project's first commit and make its parent
> the the last commit of the older project.
> Development was pretty linear.
Sure, you import them both into git with cvs2git (or something like
that), then you fetch all the commits into a single git repository.
Then it becomes a problem of merging two git histories, something
that's widely documented and well understood.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: cvs importing a forked project
2010-10-01 17:38 cvs importing a forked project Eric Frederich
2010-10-01 17:53 ` Ævar Arnfjörð Bjarmason
@ 2010-10-01 17:57 ` Brandon Casey
2010-10-05 18:38 ` Eric Frederich
1 sibling, 1 reply; 7+ messages in thread
From: Brandon Casey @ 2010-10-01 17:57 UTC (permalink / raw)
To: Eric Frederich; +Cc: git
On 10/01/2010 12:38 PM, Eric Frederich wrote:
> Hello,
>
> I have a project (several actually) where development was done in cvs
> for 10 years. Then, about 5 years ago, a copy of the latest was made
> and development continued in a new project.
> Development in the old project stopped for the most part.
>
> Is there any way where I can combine these two projects in git?
> Basically, take the newer project's first commit and make its parent
> the the last commit of the older project.
> Development was pretty linear.
You can do this very easily using grafts.
https://git.wiki.kernel.org/index.php/GraftPoint
filter-branch can be used to rewrite the history and make the grafts
permanent.
-Brandon
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: cvs importing a forked project
2010-10-01 17:57 ` Brandon Casey
@ 2010-10-05 18:38 ` Eric Frederich
2010-10-05 19:20 ` Ævar Arnfjörð Bjarmason
0 siblings, 1 reply; 7+ messages in thread
From: Eric Frederich @ 2010-10-05 18:38 UTC (permalink / raw)
To: Brandon Casey; +Cc: git
Interesting. Looks easy to use except I can't figure out how to get
the two projects imported to the same git project.
If I run the following...
$ git cvsimport -C myproject -d /some/vault projects/foo_old
$ git cvsimport -C myproject -d /some/vault projects/foo_new
... then the projects look to be merged at some arbitrary point in
time based on date.
I'm not even sure if the entire history of foo_new is imported.
This is just based off of what gitk is showing me but it seems to take
the entire history of foo_old but when importing foo_new but it looks
like only commits made after the last commit of foo_old are imported.
Obviously this isn't even using grafts since there is no grafts file.
How do I get these two projects imported in their entirety into a
single git repository so that I can create my own grafts file?
Also, once I have my two projects imported into the same grafts file
they should be completely independent right?... how do I switch
between them then or even know what the SHA-1's are if they're not
connected at all?
Thanks,
~Eric
On Fri, Oct 1, 2010 at 1:57 PM, Brandon Casey
<brandon.casey.ctr@nrlssc.navy.mil> wrote:
> On 10/01/2010 12:38 PM, Eric Frederich wrote:
>> Hello,
>>
>> I have a project (several actually) where development was done in cvs
>> for 10 years. Then, about 5 years ago, a copy of the latest was made
>> and development continued in a new project.
>> Development in the old project stopped for the most part.
>>
>> Is there any way where I can combine these two projects in git?
>> Basically, take the newer project's first commit and make its parent
>> the the last commit of the older project.
>> Development was pretty linear.
>
> You can do this very easily using grafts.
>
> https://git.wiki.kernel.org/index.php/GraftPoint
>
> filter-branch can be used to rewrite the history and make the grafts
> permanent.
>
> -Brandon
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: cvs importing a forked project
2010-10-05 18:38 ` Eric Frederich
@ 2010-10-05 19:20 ` Ævar Arnfjörð Bjarmason
2010-10-06 14:51 ` Eric Frederich
0 siblings, 1 reply; 7+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-10-05 19:20 UTC (permalink / raw)
To: Eric Frederich; +Cc: Brandon Casey, git
On Tue, Oct 5, 2010 at 18:38, Eric Frederich <eric.frederich@gmail.com> wrote:
> Interesting. Looks easy to use except I can't figure out how to get
> the two projects imported to the same git project.
>
> If I run the following...
>
> $ git cvsimport -C myproject -d /some/vault projects/foo_old
> $ git cvsimport -C myproject -d /some/vault projects/foo_new
Either switch to a new parentless branch between the two (I don't know
cvsimport), or import them in two distinct git repositories. Then when
that's finished do:
git init the-merge &&
cd the-merge &&
git remote add ~/cvs-repo-1 &&
git remote add ~/cvs-repo-2 &&
git remote update
And you'll have all those commits / branches / tags from both of them
to work with.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: cvs importing a forked project
2010-10-05 19:20 ` Ævar Arnfjörð Bjarmason
@ 2010-10-06 14:51 ` Eric Frederich
2010-10-06 16:34 ` Ævar Arnfjörð Bjarmason
0 siblings, 1 reply; 7+ messages in thread
From: Eric Frederich @ 2010-10-06 14:51 UTC (permalink / raw)
To: Ævar Arnfjörð Bjarmason; +Cc: Brandon Casey, git
Thanks a bunch.
That set of commands seemed to work except the "git remote add"
commands needed a name.
After doing that I saw both disconnected trees in gitk. I created my
.git/info/grafts file and it looked good.
I removed the two remotes afterwards and had to manually create a master branch.
I wanted to try to "switch to a new parentless branch" but don't know how.
How can I create / switch to a new empty parentless branch?
On Tue, Oct 5, 2010 at 3:20 PM, Ævar Arnfjörð Bjarmason
<avarab@gmail.com> wrote:
> On Tue, Oct 5, 2010 at 18:38, Eric Frederich <eric.frederich@gmail.com> wrote:
>> Interesting. Looks easy to use except I can't figure out how to get
>> the two projects imported to the same git project.
>>
>> If I run the following...
>>
>> $ git cvsimport -C myproject -d /some/vault projects/foo_old
>> $ git cvsimport -C myproject -d /some/vault projects/foo_new
>
> Either switch to a new parentless branch between the two (I don't know
> cvsimport), or import them in two distinct git repositories. Then when
> that's finished do:
>
> git init the-merge &&
> cd the-merge &&
> git remote add ~/cvs-repo-1 &&
> git remote add ~/cvs-repo-2 &&
> git remote update
>
> And you'll have all those commits / branches / tags from both of them
> to work with.
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: cvs importing a forked project
2010-10-06 14:51 ` Eric Frederich
@ 2010-10-06 16:34 ` Ævar Arnfjörð Bjarmason
0 siblings, 0 replies; 7+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-10-06 16:34 UTC (permalink / raw)
To: Eric Frederich; +Cc: Brandon Casey, git
On Wed, Oct 6, 2010 at 14:51, Eric Frederich <eric.frederich@gmail.com> wrote:
> I wanted to try to "switch to a new parentless branch" but don't know how.
> How can I create / switch to a new empty parentless branch?
git checkout --orphan parentless-branch-name-here
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-10-06 16:34 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-01 17:38 cvs importing a forked project Eric Frederich
2010-10-01 17:53 ` Ævar Arnfjörð Bjarmason
2010-10-01 17:57 ` Brandon Casey
2010-10-05 18:38 ` Eric Frederich
2010-10-05 19:20 ` Ævar Arnfjörð Bjarmason
2010-10-06 14:51 ` Eric Frederich
2010-10-06 16:34 ` Ævar Arnfjörð Bjarmason
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).