-1

I have really strange case, when I cannot to ignore a log file "SE.log" in my git repository. I have created "tmp.log" file and it to ignore properly.

enter image description here

my .gitignore file:

enter image description here

ppostnov
  • 139
  • 9
  • Did you ever add or commit se.log? – D. Ben Knoble Apr 08 '20 at 12:55
  • hi , not sure that correct understood you. Can you please explain more detailed what you mean ? – ppostnov Apr 08 '20 at 12:56
  • 1
    Does this answer your question? [How to make Git "forget" about a file that was tracked but is now in .gitignore?](https://stackoverflow.com/questions/1274057/how-to-make-git-forget-about-a-file-that-was-tracked-but-is-now-in-gitignore) – phd Apr 08 '20 at 14:38

2 Answers2

1

It looks like SE.log has already been committed, you need to do a:

git rm -rf --cached .
git add .
git commit -m "SE.log is now ignored"
simon-pearson
  • 1,601
  • 8
  • 10
0

You just need to remove your file from commit list using

git rm --cached

and then commit.

See this Remove files from Git commit

Sohag Hasan
  • 160
  • 1
  • 7