How to select git commit ranges with inclusive end points

Viewed 3518

I need to specify all commits downstream of the 1st commit in a git repo.

I am trying to run this command:

$ git filter-branch --index-filter 'git rm --ignore-unmatch --cached some/path/file' -- 33e0331^..

And I am getting:

fatal: ambiguous argument '33e0331^..': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

Because 33e0331 is the first commit in the repo. How do I do this ?

3 Answers

I your case, you seem to be looking for a way to specify --all.

Here is the <rev-list options> section of git help filter-branch :

   <rev-list options>...
       Arguments for git rev-list. All positive refs included by these options are
       rewritten. You may also specify options such as --all, but you must use --
       to separate them from the git filter-branch options. Implies the section 
       called “Remap to ancestor”.

and some sample usage in the EXAMPLES section.

In your case :

git filter-branch --index-filter 'git rm ...' -- --all
Related