0

I want to remove any tracking of my .csv files in my repository, so I added the line .csv to my .gitignore file.

However, I would also like to remove all the tracking of all my already tracked csv files. I wanted to use git filter-repo, running 'git filter-repo --path *.csv --invert-path', however this does not seem to work out, and i can't find any way to remove more than 1 file from the history after reading: https://htmlpreview.github.io/?https://github.com/newren/git-filter-repo/blob/docs/html/git-filter-repo.html#EXAMPLES.

Thanks for your help !

accoumar
  • 21
  • 3
  • 1
    If you just untrack those files, they will still be in the history of the repository, meaning that if the files are big, every time somebody clones the repository, they need to download them. If you want to overwrite the history to delete them completely, you can use `bfg` tool – Alexey S. Larionov Aug 28 '23 at 13:04
  • 1
    `-- path '*.csv'`, otherwise the `*` will be expanded by your shell before `filter-repo` is executed – knittl Aug 28 '23 at 13:12
  • For a particular branch, just use `git rm --cached` to delete the unwanted files from the index, and commit. Now the files are untracked. – matt Aug 28 '23 at 13:32
  • I finally used git rm --cached since i wanted to keep a trace of my csv files in the past. – accoumar Aug 29 '23 at 07:33

0 Answers0