Hi
I'm trying to use git filter-branch to move all contents of a repo into a subdirectory of the repo root. The git filter-branch man page has the following example:
To move the whole tree into a subdirectory, or remove it from there:
git filter-branch --index-filter \
'git ls-files -s | sed "s-\t\"*-&newsubdir/-" |
GIT_INDEX_FILE=$GIT_INDEX_FILE.new \
git update-index --index-info &&
mv $GIT_INDEX_FILE.new $GIT_INDEX_FILE' HEADSo I've been trying to use this, the original structure of the repo is:
$ ls 00boot SFTdumpall.c debian Makefile.am SFTdumpheader.c ligodcc.cls README SFTvalidate.c pdfdraftcopy.sty SCCB_2004_09_09 SFTwrite.c run_validate.sh SFTReferenceLibrary.c T040164.tex sftreferencelibrary-2.2.tar.gz SFTReferenceLibrary.h configure.in sftreferencelibrary-2.3.tar.gz $
and I want all this in a subdirectory call "sftlib", so using the example from the manpage I ran:
$ git filter-branch --index-filter \
'git ls-files -s | sed "s-\t\"*-&sftlib/-" |
GIT_INDEX_FILE=$GIT_INDEX_FILE.new \
git update-index --index-info &&
mv $GIT_INDEX_FILE.new $GIT_INDEX_FILE' HEAD
Rewrite 223651f2ebd5d5d9341bcfc9e7cb6caaa3f4d171 (56/65)Ignoring path
00bootsftlib/
Rewrite c979ee835ebb89408e2f5f345ddefbb4d8cd75f5 (57/65)Ignoring path
00bootsftlib/
Rewrite 10037389e41fb4b4d04234ca2e302a7a491616d5 (58/65)Ignoring path
00bootsftlib/
Rewrite 21b4c31a02c6b7718145d471ba20e6fa70eb30d0 (59/65)Ignoring path
00bootsftlib/
Rewrite dc5cebbe14050f52f2effaa5eac4eb579dd440c3 (60/65)Ignoring path
00bootsftlib/
Rewrite 3b83fdd19b5d674445f5263df8cb2fc35c3c0092 (61/65)Ignoring path
00bootsftlib/
Rewrite 5246038ceeb2d28fba462076b62f3cf1b2b7e9ab (62/65)Ignoring path
00bootsftlib/
Rewrite 0fd3256ff401b405c677e83db350ad41ee74ef0d (63/65)Ignoring path
00bootsftlib/
Ignoring path debian/compatsftlib/
Ignoring path debian/copyrightsftlib/
Rewrite 9aca227c807658b951e81a6ca4460115b2fe8ccc (64/65)Ignoring path
00bootsftlib/
Ignoring path debian/compatsftlib/
Ignoring path debian/copyrightsftlib/
Rewrite 00274be10e10920d84db145268d85faf1b06539f (65/65)Ignoring path
00bootsftlib/
Ignoring path debian/compatsftlib/
Ignoring path debian/copyrightsftlib/Ref 'refs/heads/to_merge' was rewritten $
now the directory structure is:
$ ls Makefile.am SCCB_2004_09_09 SFTReferenceLibrary.h SFTdumpheader.c SFTwritsftlib configure.in ligodcc.cls run_validatsftlib README SFTReferenceLibrary.c SFTdumpall.c SFTvalidatsftlib T040164.tsftlib debian pdfdraftsftlib sftsftlib $
which is clearly not what I'm wanting. What I am doing wrong here? As far as I can I'm using the example from the man-page?
Cheers
Adam