{"thread":{"id":"44898","subject":"fatal: bad revision 'git rm -r --ignore-unmatch -- folder'","startedAt":"2017-01-17T15:31:14Z","lastAt":"2017-01-20T15:34:03Z","messageCount":5,"participants":["jean-christophe manciot","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"309516","messageId":"CAKcFC3aqjLNUNKPDZ08rO_SBkY84uvHBerCxnSchAe8rH0dnMg@mail.gmail.com","threadId":"44898","inReplyTo":null,"subject":"fatal: bad revision 'git rm -r --ignore-unmatch -- folder'","fromName":"jean-christophe manciot","fromEmail":"actionmystique@gmail.com","sentAt":"2017-01-17T15:30:48Z","receivedAt":"2017-01-17T15:31:14Z","isPatch":false,"sender":{"key":"actionmystique@gmail.com","avatar":null},"body":"Hi there,\n\nI'm trying to purge a complete folder and its files from the\nrepository history with:\n\ngit-Games# git filter-branch 'git rm -r --ignore-unmatch --\nUbuntu/16.04/' --tag-name-filter cat -- --all HEAD\nfatal: bad revision 'git rm -r --ignore-unmatch -- Ubuntu/16.04/'\n\ngit does not find the folder although it's there:\n\ngit-Games# ll Ubuntu/16.04/\ntotal 150316\ndrwxr-x--- 2 actionmystique actionmystique     4096 Nov 19 13:40 ./\ndrwxr-x--- 4 actionmystique actionmystique     4096 Oct 30 14:02 ../\n-rwxr-x--- 1 actionmystique actionmystique  2190394 May  9  2016\nresidualvm_0.3.0~git-1_amd64.deb*\n...\n-rw-r--r-- 1 actionmystique actionmystique 67382492 Oct 13 09:15\nscummvm-dbgsym_1.9.0_amd64.deb\n\nWhat is going on?\n\n-- \nJean-Christophe\n"},{"id":"309520","messageId":"20170117153807.g4dlv5glfnvc3zc6@sigill.intra.peff.net","threadId":"44898","inReplyTo":"CAKcFC3aqjLNUNKPDZ08rO_SBkY84uvHBerCxnSchAe8rH0dnMg@mail.gmail.com","subject":"Re: fatal: bad revision 'git rm -r --ignore-unmatch -- folder'","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2017-01-17T15:38:08Z","receivedAt":"2017-01-17T15:45:06Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Jan 17, 2017 at 04:30:48PM +0100, jean-christophe manciot wrote:\n\n> I'm trying to purge a complete folder and its files from the\n> repository history with:\n> \n> git-Games# git filter-branch 'git rm -r --ignore-unmatch --\n> Ubuntu/16.04/' --tag-name-filter cat -- --all HEAD\n> fatal: bad revision 'git rm -r --ignore-unmatch -- Ubuntu/16.04/'\n\nDid you forget \"--tree-filter\" or \"--index-filter\" before the \"git rm\"\nparameter? Without an option it will be interpreted as a refname, which\nit obviously isn't.\n\n-Peff\n"},{"id":"309713","messageId":"CAKcFC3ZN+=o_2t4AawCE0c4Tw+t_XJKTHtEq9d7bv-ht5euPbw@mail.gmail.com","threadId":"44898","inReplyTo":"CAKcFC3aqjLNUNKPDZ08rO_SBkY84uvHBerCxnSchAe8rH0dnMg@mail.gmail.com","subject":"Re: fatal: bad revision 'git rm -r --ignore-unmatch -- folder'","fromName":"jean-christophe manciot","fromEmail":"actionmystique@gmail.com","sentAt":"2017-01-19T08:32:11Z","receivedAt":"2017-01-19T08:33:22Z","isPatch":false,"sender":{"key":"actionmystique@gmail.com","avatar":null},"body":"In case you were wondering whether these files were tracked or not:\n\ngit-Games# git ls-files Ubuntu/16.04\nUbuntu/16.04/residualvm_0.3.0~git-1_amd64.deb\nUbuntu/16.04/scummvm-data_1.8.0_all.deb\nUbuntu/16.04/scummvm-data_1.9.0_all.deb\nUbuntu/16.04/scummvm-dbgsym_1.8.2~git20160821.bad86050_amd64.deb\nUbuntu/16.04/scummvm-dbgsym_1.9.0_amd64.deb\nUbuntu/16.04/scummvm_1.8.0_amd64.deb\nUbuntu/16.04/scummvm_1.9.0_amd64.deb\n\nOn Tue, Jan 17, 2017 at 4:30 PM, jean-christophe manciot\n<actionmystique@gmail.com> wrote:\n> Hi there,\n>\n> I'm trying to purge a complete folder and its files from the\n> repository history with:\n>\n> git-Games# git filter-branch 'git rm -r --ignore-unmatch --\n> Ubuntu/16.04/' --tag-name-filter cat -- --all HEAD\n> fatal: bad revision 'git rm -r --ignore-unmatch -- Ubuntu/16.04/'\n>\n> git does not find the folder although it's there:\n>\n> git-Games# ll Ubuntu/16.04/\n> total 150316\n> drwxr-x--- 2 actionmystique actionmystique     4096 Nov 19 13:40 ./\n> drwxr-x--- 4 actionmystique actionmystique     4096 Oct 30 14:02 ../\n> -rwxr-x--- 1 actionmystique actionmystique  2190394 May  9  2016\n> residualvm_0.3.0~git-1_amd64.deb*\n> ...\n> -rw-r--r-- 1 actionmystique actionmystique 67382492 Oct 13 09:15\n> scummvm-dbgsym_1.9.0_amd64.deb\n>\n> What is going on?\n>\n> --\n> Jean-Christophe\n\n\n\n-- \nJean-Christophe\n"},{"id":"309714","messageId":"CAKcFC3aHZP5-MJaNj4vv_qBwY3xNRodYnfw0P-G-Q+XfaRf=Cw@mail.gmail.com","threadId":"44898","inReplyTo":"CAKcFC3ZN+=o_2t4AawCE0c4Tw+t_XJKTHtEq9d7bv-ht5euPbw@mail.gmail.com","subject":"Re: fatal: bad revision 'git rm -r --ignore-unmatch -- folder'","fromName":"jean-christophe manciot","fromEmail":"actionmystique@gmail.com","sentAt":"2017-01-19T08:42:31Z","receivedAt":"2017-01-19T08:43:47Z","isPatch":false,"sender":{"key":"actionmystique@gmail.com","avatar":null},"body":"Also some context information:\nUbuntu 16.10 4.8\ngit 2.11.0\n\nOn Thu, Jan 19, 2017 at 9:32 AM, jean-christophe manciot\n<actionmystique@gmail.com> wrote:\n> In case you were wondering whether these files were tracked or not:\n>\n> git-Games# git ls-files Ubuntu/16.04\n> Ubuntu/16.04/residualvm_0.3.0~git-1_amd64.deb\n> Ubuntu/16.04/scummvm-data_1.8.0_all.deb\n> Ubuntu/16.04/scummvm-data_1.9.0_all.deb\n> Ubuntu/16.04/scummvm-dbgsym_1.8.2~git20160821.bad86050_amd64.deb\n> Ubuntu/16.04/scummvm-dbgsym_1.9.0_amd64.deb\n> Ubuntu/16.04/scummvm_1.8.0_amd64.deb\n> Ubuntu/16.04/scummvm_1.9.0_amd64.deb\n>\n> On Tue, Jan 17, 2017 at 4:30 PM, jean-christophe manciot\n> <actionmystique@gmail.com> wrote:\n>> Hi there,\n>>\n>> I'm trying to purge a complete folder and its files from the\n>> repository history with:\n>>\n>> git-Games# git filter-branch 'git rm -r --ignore-unmatch --\n>> Ubuntu/16.04/' --tag-name-filter cat -- --all HEAD\n>> fatal: bad revision 'git rm -r --ignore-unmatch -- Ubuntu/16.04/'\n>>\n>> git does not find the folder although it's there:\n>>\n>> git-Games# ll Ubuntu/16.04/\n>> total 150316\n>> drwxr-x--- 2 actionmystique actionmystique     4096 Nov 19 13:40 ./\n>> drwxr-x--- 4 actionmystique actionmystique     4096 Oct 30 14:02 ../\n>> -rwxr-x--- 1 actionmystique actionmystique  2190394 May  9  2016\n>> residualvm_0.3.0~git-1_amd64.deb*\n>> ...\n>> -rw-r--r-- 1 actionmystique actionmystique 67382492 Oct 13 09:15\n>> scummvm-dbgsym_1.9.0_amd64.deb\n>>\n>> What is going on?\n>>\n>> --\n>> Jean-Christophe\n>\n>\n>\n> --\n> Jean-Christophe\n\n\n\n-- \nJean-Christophe\n"},{"id":"309838","messageId":"CAKcFC3YZMA7AP+9d5nuUfeAjyu67cRT=djVh5Znh=Gj-Gr6UWg@mail.gmail.com","threadId":"44898","inReplyTo":"CAKcFC3ZYwrVfEZ2Xua1kpQVeOMKY-wM=oce9JQhz4Tnookf8Dg@mail.gmail.com","subject":"Re: fatal: bad revision 'git rm -r --ignore-unmatch -- folder'","fromName":"jean-christophe manciot","fromEmail":"actionmystique@gmail.com","sentAt":"2017-01-20T15:24:39Z","receivedAt":"2017-01-20T15:34:03Z","isPatch":false,"sender":{"key":"actionmystique@gmail.com","avatar":null},"body":"I've finally found the correct command after some significant research:\ngit filter-branch --tag-name-filter cat --index-filter \"git rm -r\n--cached --ignore-unmatch ${file_path}/${file_name}\" --prune-empty\n--force -- --all\n\nOn Fri, Jan 20, 2017 at 4:23 PM, jean-christophe manciot\n<actionmystique@gmail.com> wrote:\n> I've finally found the correct command after some significant research:\n> git filter-branch --tag-name-filter cat --index-filter \"git rm -r --cached\n> --ignore-unmatch ${file_path}/${file_name}\" --prune-empty --force -- --all\n>\n> On Thu, Jan 19, 2017 at 9:42 AM, jean-christophe manciot\n> <actionmystique@gmail.com> wrote:\n>>\n>> Also some context information:\n>> Ubuntu 16.10 4.8\n>> git 2.11.0\n>>\n>> On Thu, Jan 19, 2017 at 9:32 AM, jean-christophe manciot\n>> <actionmystique@gmail.com> wrote:\n>> > In case you were wondering whether these files were tracked or not:\n>> >\n>> > git-Games# git ls-files Ubuntu/16.04\n>> > Ubuntu/16.04/residualvm_0.3.0~git-1_amd64.deb\n>> > Ubuntu/16.04/scummvm-data_1.8.0_all.deb\n>> > Ubuntu/16.04/scummvm-data_1.9.0_all.deb\n>> > Ubuntu/16.04/scummvm-dbgsym_1.8.2~git20160821.bad86050_amd64.deb\n>> > Ubuntu/16.04/scummvm-dbgsym_1.9.0_amd64.deb\n>> > Ubuntu/16.04/scummvm_1.8.0_amd64.deb\n>> > Ubuntu/16.04/scummvm_1.9.0_amd64.deb\n>> >\n>> > On Tue, Jan 17, 2017 at 4:30 PM, jean-christophe manciot\n>> > <actionmystique@gmail.com> wrote:\n>> >> Hi there,\n>> >>\n>> >> I'm trying to purge a complete folder and its files from the\n>> >> repository history with:\n>> >>\n>> >> git-Games# git filter-branch 'git rm -r --ignore-unmatch --\n>> >> Ubuntu/16.04/' --tag-name-filter cat -- --all HEAD\n>> >> fatal: bad revision 'git rm -r --ignore-unmatch -- Ubuntu/16.04/'\n>> >>\n>> >> git does not find the folder although it's there:\n>> >>\n>> >> git-Games# ll Ubuntu/16.04/\n>> >> total 150316\n>> >> drwxr-x--- 2 actionmystique actionmystique     4096 Nov 19 13:40 ./\n>> >> drwxr-x--- 4 actionmystique actionmystique     4096 Oct 30 14:02 ../\n>> >> -rwxr-x--- 1 actionmystique actionmystique  2190394 May  9  2016\n>> >> residualvm_0.3.0~git-1_amd64.deb*\n>> >> ...\n>> >> -rw-r--r-- 1 actionmystique actionmystique 67382492 Oct 13 09:15\n>> >> scummvm-dbgsym_1.9.0_amd64.deb\n>> >>\n>> >> What is going on?\n>> >>\n>> >> --\n>> >> Jean-Christophe\n>> >\n>> >\n>> >\n>> > --\n>> > Jean-Christophe\n>>\n>>\n>>\n>> --\n>> Jean-Christophe\n>\n>\n>\n>\n> --\n> Jean-Christophe\n\n\n\n-- \nJean-Christophe\n"}]}