file exist in git log, how to ignore this file in future git commit

Viewed 8

see my gif, in my case, I have git commit lib/file1.rb, so when i add lib/file1.rb in .gitignore, git check-ignore lib/file1.rb still return empty(lib/file1.rb is not ignored), as comparison, git check-ignore lib/file3.rb is ignored

so how to ignore file that exist in git log

enter image description here

0 Answers
Related