0

I want to stop tracking a data.pkl file, which is too large to push to github.

I've used "git rm --cached data.pkl" to remove tracking according to Remove a folder from git tracking

I used "git ls-tree -r master --name-only" to check what files are tracked. I found data.pkl shows in the list. Even I did git rm --cached -r ., I still see all files being tracked.

Below screenshot shows the .pkl I want to stop tracking already in "delete mode". But once I do push, these files are resulting in a push failure.

enter image description here

Lisa
  • 4,126
  • 12
  • 42
  • 71
  • `git ls-tree -r master --name-only` output content of commit pointed by `master`. `git rm --cached data.pkl` only modify index and not affect any existing commit or reference. – user4003407 Feb 28 '18 at 16:58
  • Then how can I check whether I've stop tracking data.pkl? @PetSerAI – Lisa Feb 28 '18 at 17:06
  • 2
    Point of Git is to preserve your entire history. Untracking file do not remove it from history. To remove file from your history, you need to rewrite your history. – user4003407 Feb 28 '18 at 17:18
  • I'm running into this same issue, is there a way to remove this reference to the large file?? right now I can't push my changes to github. I have deleted the file locally, deleted it from github respository and used the git rm --cache filename ...but somehow it's still complaining about htis large file – mike hennessy Sep 07 '19 at 14:49

0 Answers0