Search code examples
gitgithubgitignore

How can I stop pushing files with bin and npy extensions using gitignore?


I have two heavy files weights.bin and perf.npy, like other files to be ignored, I added the following to my gitignore file:

*.bin

*.npy

However, when I try to push them, it still appears on my github? Could you help me with that?


Solution

  • You can try clear cache of git:

    git rm -r --cached .
    git add .
    git commit -am 'git cache cleared'
    git push