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 !

4
  • 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 Commented Aug 28, 2023 at 13:04
  • 1
    -- path '*.csv', otherwise the * will be expanded by your shell before filter-repo is executed Commented Aug 28, 2023 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. Commented Aug 28, 2023 at 13:32
  • I finally used git rm --cached since i wanted to keep a trace of my csv files in the past. Commented Aug 29, 2023 at 7:33

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.