Trying to split repository

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]