From: shawn wilson Date: Fri, 09 Aug 2013 06:33:53 GMT Subject: Re: Repo with only one file Message-ID: In-Reply-To: <52048B5B.5060009@viscovery.net> On Fri, Aug 9, 2013 at 2:25 AM, Johannes Sixt wrote: > Am 8/8/2013 23:11, schrieb Phil Hord: >> On Wed, Aug 7, 2013 at 5:07 PM, shawn wilson wrote: >>> On Wed, Aug 7, 2013 at 6:43 AM, Johannes Sixt wrote: >>>> Am 8/7/2013 8:24, schrieb shawn wilson:> ... create a repo for one of >>>>> these scripts and I'd like to keep the commit history. >>>>> >>>>> Ok, so: >>>>> % find -type f ! -iname "webban.pl" | while read f; do git >>>>> filter-branch -f --index-filter "git rm --cached --ignore-unmatch $f" >>>>> HEAD ; done >>>>> > I'm not sure. On second thought, my suggested command is not sufficient. > It does remove the empty commits, but it does not remove the other files. > So, Shawn's original filter-branch invocations are still needed. > Yeah, I have tried this and haven't gotten any closer. I can either remove all of the history or that one commit that has nothing to do with my file is there. This is also reproducable in a new repo. Is this a bug with filter-branch or git? This doesn't seem like a feature (or how things should act).