git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* fatal: bad revision 'git rm -r --ignore-unmatch -- folder'
@ 2017-01-17 15:30 jean-christophe manciot
  2017-01-17 15:38 ` Jeff King
  2017-01-19  8:32 ` jean-christophe manciot
  0 siblings, 2 replies; 5+ messages in thread
From: jean-christophe manciot @ 2017-01-17 15:30 UTC (permalink / raw)
  To: git

Hi there,

I'm trying to purge a complete folder and its files from the
repository history with:

git-Games# git filter-branch 'git rm -r --ignore-unmatch --
Ubuntu/16.04/' --tag-name-filter cat -- --all HEAD
fatal: bad revision 'git rm -r --ignore-unmatch -- Ubuntu/16.04/'

git does not find the folder although it's there:

git-Games# ll Ubuntu/16.04/
total 150316
drwxr-x--- 2 actionmystique actionmystique     4096 Nov 19 13:40 ./
drwxr-x--- 4 actionmystique actionmystique     4096 Oct 30 14:02 ../
-rwxr-x--- 1 actionmystique actionmystique  2190394 May  9  2016
residualvm_0.3.0~git-1_amd64.deb*
...
-rw-r--r-- 1 actionmystique actionmystique 67382492 Oct 13 09:15
scummvm-dbgsym_1.9.0_amd64.deb

What is going on?

-- 
Jean-Christophe

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: fatal: bad revision 'git rm -r --ignore-unmatch -- folder'
  2017-01-17 15:30 fatal: bad revision 'git rm -r --ignore-unmatch -- folder' jean-christophe manciot
@ 2017-01-17 15:38 ` Jeff King
  2017-01-19  8:32 ` jean-christophe manciot
  1 sibling, 0 replies; 5+ messages in thread
From: Jeff King @ 2017-01-17 15:38 UTC (permalink / raw)
  To: jean-christophe manciot; +Cc: git

On Tue, Jan 17, 2017 at 04:30:48PM +0100, jean-christophe manciot wrote:

> I'm trying to purge a complete folder and its files from the
> repository history with:
> 
> git-Games# git filter-branch 'git rm -r --ignore-unmatch --
> Ubuntu/16.04/' --tag-name-filter cat -- --all HEAD
> fatal: bad revision 'git rm -r --ignore-unmatch -- Ubuntu/16.04/'

Did you forget "--tree-filter" or "--index-filter" before the "git rm"
parameter? Without an option it will be interpreted as a refname, which
it obviously isn't.

-Peff

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: fatal: bad revision 'git rm -r --ignore-unmatch -- folder'
  2017-01-17 15:30 fatal: bad revision 'git rm -r --ignore-unmatch -- folder' jean-christophe manciot
  2017-01-17 15:38 ` Jeff King
@ 2017-01-19  8:32 ` jean-christophe manciot
  2017-01-19  8:42   ` jean-christophe manciot
  1 sibling, 1 reply; 5+ messages in thread
From: jean-christophe manciot @ 2017-01-19  8:32 UTC (permalink / raw)
  To: git

In case you were wondering whether these files were tracked or not:

git-Games# git ls-files Ubuntu/16.04
Ubuntu/16.04/residualvm_0.3.0~git-1_amd64.deb
Ubuntu/16.04/scummvm-data_1.8.0_all.deb
Ubuntu/16.04/scummvm-data_1.9.0_all.deb
Ubuntu/16.04/scummvm-dbgsym_1.8.2~git20160821.bad86050_amd64.deb
Ubuntu/16.04/scummvm-dbgsym_1.9.0_amd64.deb
Ubuntu/16.04/scummvm_1.8.0_amd64.deb
Ubuntu/16.04/scummvm_1.9.0_amd64.deb

On Tue, Jan 17, 2017 at 4:30 PM, jean-christophe manciot
<actionmystique@gmail.com> wrote:
> Hi there,
>
> I'm trying to purge a complete folder and its files from the
> repository history with:
>
> git-Games# git filter-branch 'git rm -r --ignore-unmatch --
> Ubuntu/16.04/' --tag-name-filter cat -- --all HEAD
> fatal: bad revision 'git rm -r --ignore-unmatch -- Ubuntu/16.04/'
>
> git does not find the folder although it's there:
>
> git-Games# ll Ubuntu/16.04/
> total 150316
> drwxr-x--- 2 actionmystique actionmystique     4096 Nov 19 13:40 ./
> drwxr-x--- 4 actionmystique actionmystique     4096 Oct 30 14:02 ../
> -rwxr-x--- 1 actionmystique actionmystique  2190394 May  9  2016
> residualvm_0.3.0~git-1_amd64.deb*
> ...
> -rw-r--r-- 1 actionmystique actionmystique 67382492 Oct 13 09:15
> scummvm-dbgsym_1.9.0_amd64.deb
>
> What is going on?
>
> --
> Jean-Christophe



-- 
Jean-Christophe

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: fatal: bad revision 'git rm -r --ignore-unmatch -- folder'
  2017-01-19  8:32 ` jean-christophe manciot
@ 2017-01-19  8:42   ` jean-christophe manciot
       [not found]     ` <CAKcFC3ZYwrVfEZ2Xua1kpQVeOMKY-wM=oce9JQhz4Tnookf8Dg@mail.gmail.com>
  0 siblings, 1 reply; 5+ messages in thread
From: jean-christophe manciot @ 2017-01-19  8:42 UTC (permalink / raw)
  To: git

Also some context information:
Ubuntu 16.10 4.8
git 2.11.0

On Thu, Jan 19, 2017 at 9:32 AM, jean-christophe manciot
<actionmystique@gmail.com> wrote:
> In case you were wondering whether these files were tracked or not:
>
> git-Games# git ls-files Ubuntu/16.04
> Ubuntu/16.04/residualvm_0.3.0~git-1_amd64.deb
> Ubuntu/16.04/scummvm-data_1.8.0_all.deb
> Ubuntu/16.04/scummvm-data_1.9.0_all.deb
> Ubuntu/16.04/scummvm-dbgsym_1.8.2~git20160821.bad86050_amd64.deb
> Ubuntu/16.04/scummvm-dbgsym_1.9.0_amd64.deb
> Ubuntu/16.04/scummvm_1.8.0_amd64.deb
> Ubuntu/16.04/scummvm_1.9.0_amd64.deb
>
> On Tue, Jan 17, 2017 at 4:30 PM, jean-christophe manciot
> <actionmystique@gmail.com> wrote:
>> Hi there,
>>
>> I'm trying to purge a complete folder and its files from the
>> repository history with:
>>
>> git-Games# git filter-branch 'git rm -r --ignore-unmatch --
>> Ubuntu/16.04/' --tag-name-filter cat -- --all HEAD
>> fatal: bad revision 'git rm -r --ignore-unmatch -- Ubuntu/16.04/'
>>
>> git does not find the folder although it's there:
>>
>> git-Games# ll Ubuntu/16.04/
>> total 150316
>> drwxr-x--- 2 actionmystique actionmystique     4096 Nov 19 13:40 ./
>> drwxr-x--- 4 actionmystique actionmystique     4096 Oct 30 14:02 ../
>> -rwxr-x--- 1 actionmystique actionmystique  2190394 May  9  2016
>> residualvm_0.3.0~git-1_amd64.deb*
>> ...
>> -rw-r--r-- 1 actionmystique actionmystique 67382492 Oct 13 09:15
>> scummvm-dbgsym_1.9.0_amd64.deb
>>
>> What is going on?
>>
>> --
>> Jean-Christophe
>
>
>
> --
> Jean-Christophe



-- 
Jean-Christophe

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: fatal: bad revision 'git rm -r --ignore-unmatch -- folder'
       [not found]     ` <CAKcFC3ZYwrVfEZ2Xua1kpQVeOMKY-wM=oce9JQhz4Tnookf8Dg@mail.gmail.com>
@ 2017-01-20 15:24       ` jean-christophe manciot
  0 siblings, 0 replies; 5+ messages in thread
From: jean-christophe manciot @ 2017-01-20 15:24 UTC (permalink / raw)
  To: git

I've finally found the correct command after some significant research:
git filter-branch --tag-name-filter cat --index-filter "git rm -r
--cached --ignore-unmatch ${file_path}/${file_name}" --prune-empty
--force -- --all

On Fri, Jan 20, 2017 at 4:23 PM, jean-christophe manciot
<actionmystique@gmail.com> wrote:
> I've finally found the correct command after some significant research:
> git filter-branch --tag-name-filter cat --index-filter "git rm -r --cached
> --ignore-unmatch ${file_path}/${file_name}" --prune-empty --force -- --all
>
> On Thu, Jan 19, 2017 at 9:42 AM, jean-christophe manciot
> <actionmystique@gmail.com> wrote:
>>
>> Also some context information:
>> Ubuntu 16.10 4.8
>> git 2.11.0
>>
>> On Thu, Jan 19, 2017 at 9:32 AM, jean-christophe manciot
>> <actionmystique@gmail.com> wrote:
>> > In case you were wondering whether these files were tracked or not:
>> >
>> > git-Games# git ls-files Ubuntu/16.04
>> > Ubuntu/16.04/residualvm_0.3.0~git-1_amd64.deb
>> > Ubuntu/16.04/scummvm-data_1.8.0_all.deb
>> > Ubuntu/16.04/scummvm-data_1.9.0_all.deb
>> > Ubuntu/16.04/scummvm-dbgsym_1.8.2~git20160821.bad86050_amd64.deb
>> > Ubuntu/16.04/scummvm-dbgsym_1.9.0_amd64.deb
>> > Ubuntu/16.04/scummvm_1.8.0_amd64.deb
>> > Ubuntu/16.04/scummvm_1.9.0_amd64.deb
>> >
>> > On Tue, Jan 17, 2017 at 4:30 PM, jean-christophe manciot
>> > <actionmystique@gmail.com> wrote:
>> >> Hi there,
>> >>
>> >> I'm trying to purge a complete folder and its files from the
>> >> repository history with:
>> >>
>> >> git-Games# git filter-branch 'git rm -r --ignore-unmatch --
>> >> Ubuntu/16.04/' --tag-name-filter cat -- --all HEAD
>> >> fatal: bad revision 'git rm -r --ignore-unmatch -- Ubuntu/16.04/'
>> >>
>> >> git does not find the folder although it's there:
>> >>
>> >> git-Games# ll Ubuntu/16.04/
>> >> total 150316
>> >> drwxr-x--- 2 actionmystique actionmystique     4096 Nov 19 13:40 ./
>> >> drwxr-x--- 4 actionmystique actionmystique     4096 Oct 30 14:02 ../
>> >> -rwxr-x--- 1 actionmystique actionmystique  2190394 May  9  2016
>> >> residualvm_0.3.0~git-1_amd64.deb*
>> >> ...
>> >> -rw-r--r-- 1 actionmystique actionmystique 67382492 Oct 13 09:15
>> >> scummvm-dbgsym_1.9.0_amd64.deb
>> >>
>> >> What is going on?
>> >>
>> >> --
>> >> Jean-Christophe
>> >
>> >
>> >
>> > --
>> > Jean-Christophe
>>
>>
>>
>> --
>> Jean-Christophe
>
>
>
>
> --
> Jean-Christophe



-- 
Jean-Christophe

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-01-20 15:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-17 15:30 fatal: bad revision 'git rm -r --ignore-unmatch -- folder' jean-christophe manciot
2017-01-17 15:38 ` Jeff King
2017-01-19  8:32 ` jean-christophe manciot
2017-01-19  8:42   ` jean-christophe manciot
     [not found]     ` <CAKcFC3ZYwrVfEZ2Xua1kpQVeOMKY-wM=oce9JQhz4Tnookf8Dg@mail.gmail.com>
2017-01-20 15:24       ` jean-christophe manciot

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).