Thread (4 messages) flat view 4 messages, 3 authors, 2016-06-15

Re: Moving a directory with history from one repository to another while renaming

From: Jeff King <hidden>
Date: 2016-06-15 22:43:17

On Thu, Jun 21, 2007 at 01:37:30PM +0100, Andy Parkins wrote:
 git checkout directoryonly
 git-filter-branch --tree-filter "mkdir -p sub/dir/repoB_directory; \
    mv file1 file2 file3 sub/dir/repoB_directory" directorymoved
You can do this much more efficiently by just operating on the index.
Something like:

git-filter-branch --index-filter \
 'git-ls-files -s | sed -n 's/change/paths/p' | git-update-index --index-info' \
 directorymoved

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help