git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Trying to split repository
@ 2009-10-01 16:03 Josef Wolf
  2009-10-01 16:49 ` Adam Brewster
  2009-10-01 16:49 ` Tomas Carnecky
  0 siblings, 2 replies; 9+ messages in thread
From: Josef Wolf @ 2009-10-01 16:03 UTC (permalink / raw)
  To: git

Hello,

One of my repositories has grown a subdirectory that I'd like to split off,
so other can use it as a subproject. With the help of google, I found this
solution:

    # first extract the library from the original repository
    #
    git clone --no-hardlinks repository library.tmp
    (
        cd library.tmp
        git filter-branch --subdirectory-filter CF -- --all
        git reset --hard
        git gc --aggressive
        git prune
        git gc
        git clone --bare . ../library
    )
    rm -rf library.tmp


    # Now remove the library from the original repository, so it can be
    # included as a subproject
    #
    git clone --no-hardlinks repository repository.new.tmp
    (
        cd repository.new.tmp
        git filter-branch \
            --index-filter "git rm -r -f --cached --ignore-unmatch CF" \
            -- --all
        git reset --hard
        git gc --aggressive
        git prune
        git gc
        git clone --bare . ../repository.new
    )
    rm -rf repository.new.tmp

This works fine. But there's one problem, though. "gitk --all" in the new
repository still shows all the history of the removed library. The patch
show no modifications, but the log entry is still there.

Any hints how to get rid of those log entries?

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

end of thread, other threads:[~2009-10-02 15:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-01 16:03 Trying to split repository Josef Wolf
2009-10-01 16:49 ` Adam Brewster
2009-10-01 21:13   ` Josef Wolf
2009-10-02  0:47     ` Adam Brewster
2009-10-02  0:52       ` [PATCH] filter-branch: add --prune-empty to option summary Adam Brewster
2009-10-02  7:45         ` Jeff King
2009-10-02 14:18           ` Adam Brewster
2009-10-02 15:42       ` Trying to split repository Josef Wolf
2009-10-01 16:49 ` Tomas Carnecky

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