login
Header Space

 
 

git filter-branch --subdirectory-filter

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <git@...>
Date: Thursday, May 8, 2008 - 9:01 pm

Hi All,

I have some issues with git filter-branch.

I have a git repository that I wish to split into multiple seperate
repositories for each logical
module that it contains. Each logical module is already in its own
directory at the root of the repo.

My experiments with 'git filter-branch' have been *partially* successful.

To extract a module into its own repo, I first copied the original
repo (this was a simple cp -r,
as it seemed to be the simplest way as git clone doesn't get all the branches)
and ran filter-branch with a --commit-filter to skip commits that were
irrelevant to th subdir.

That step worked just fine.

The next pass was to 'hoist' the contents of the subdir in the new
repo into the root dir.
I thought I could do this with a --subdirectory-filter argument to
filter-branch, except when I do
this, I loose tons of commits.  (The working tree is correct, i.e. the
same as the original repo
working tree, but the history is screwed).

Anybody have any idea what I am doing wrong?  If it can't be done with
--subdirectory-filter can
it be done with the 'subtree' merge strategy somehow?

Cheers,
-- 
James
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
git filter-branch --subdirectory-filter, James Sadler, (Thu May 8, 9:01 pm)
Re: git filter-branch --subdirectory-filter, Jeff King, (Thu May 8, 9:33 pm)
Re: git filter-branch --subdirectory-filter, James Sadler, (Fri May 9, 3:38 am)
Re: git filter-branch --subdirectory-filter, Jeff King, (Fri May 9, 4:00 am)
Re: git filter-branch --subdirectory-filter, James Sadler, (Fri May 9, 11:31 pm)
Re: git filter-branch --subdirectory-filter, Jeff King, (Sat May 10, 1:53 am)
Re: git filter-branch --subdirectory-filter, James Sadler, (Sat May 10, 7:38 am)
Re: git filter-branch --subdirectory-filter, Jeff King, (Sat May 10, 7:44 am)
Re: git filter-branch --subdirectory-filter, James Sadler, (Sat May 10, 3:10 am)
Re: git filter-branch --subdirectory-filter, Johannes Sixt, (Fri May 9, 3:57 am)
speck-geostationary