A few months ago, I needed to rewrite a repo by moving it to a subdirectory; I ended up (crudely) patching git-filter-branch to add a --prefix option, doing the opposite of --subdirectory-filter. I think this could be useful to other people as well. I'm attaging the diff for archeological purposes, in case this could be of help to someone. It's not a suitable patch, as I lazily removed git-read-tree's "-m" option (which is incompatible with --prefix) instead of properly adding yet another if() level. It was a one-time job, so I didn't strive for correctness. :)
tags 583682 + upstream quit Hi, Frédéric Brière wrote: How does this compare to the example from the man page? 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' HEAD Thanks :) Jonathan
Damn. :)
Frédéric Brière wrote: Hmm, in that case, how about something like this patch? diff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt index 020028c..1c0194a 100644 --- a/Documentation/git-filter-branch.txt +++ b/Documentation/git-filter-branch.txt @@ -158,10 +158,13 @@ to other tags will be rewritten to point to the underlying commit.
Makes sense.
Hello Sir&Madam, Wishing you a wonderful day. Do you need wholesale usb flash drives?Our company have been working on the fields of wholesale usb flash drives for 10 years. www.pzxtech.com For promote our growth of trade. it has 1 models promotional usb flash drive for special below: Items:Card shape promotional usb flash drive Capacity: 1GB/2GB/4GB/8GB/16GB Unit price: US$1.73/1.81/2.07/2.28/3.81 We have some special Usb flash drive which we developed them by ourselves. If you required , we could send you E-catalogue and free samples Kindly reply at your earliest convenience. Best regards James ShenZhen PengZe Xing Technology Co.,Ltd Add:A18C, LongXing Building,Bulong Road, longGang,ShenZhen,China Tel:+86-755-28760211 Email:Sales@pzxtech.com and James@pzxtech.com Website:www.pzxtech.com If you no longer wish to receive our emails, you may unsubscribe here by email.Please consider the environment before printing this e-mail.