0

I added 'dist' folder to .gitignore. I expect that now this folder and its contents wont be tracked by git.

But when I do 'git status', I see:

deleted: dist/app.bundle.js

deleted: dist/favicon.png

deleted: dist/index.html

Why this behaviour?

Community
  • 1
  • 1
Mandroid
  • 6,200
  • 12
  • 64
  • 134
  • 2
    it's because you had already committed these files. do a `git rm` on them, then `git add` your .gitignore, then you should be golden after a push. those files will no longer be tracked after the commit – ddavison May 19 '19 at 05:24
  • Possible duplicate of [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 May 19 '19 at 12:00
  • https://stackoverflow.com/search?q=%5Bgitignore%5D+forget+tracked+files – phd May 19 '19 at 12:00

1 Answers1

0

If you did a commit before you made the gitignore then the status is showing the files it's going to delete. Which are now in gitignore