0

I have read this guide and says:

enter image description here

Why is the directory "Timer/RoutineTimer/.idea/" not ignored in my repository?

My repository

prov
  • 61
  • 6
  • 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) – kaiya Feb 26 '20 at 19:17

2 Answers2

2

.gitignore will only prevent this file from being added, but it is already in the repository. You have to remove the files from your repository. The following link has more information:

Gitignore not working

feyd
  • 185
  • 1
  • 1
  • 11
1

To un-track a committed pattern (file/folder) you must first remove it from the staging area, add it to .gitignore and commit your changes

# remove any committed file. 
git rm -r --cached <file>

# remove any committed directory and all its content.  (-rf for recursive)
git rm -rf --cached <folder>

enter image description here

If you wish to totally remove the content form your repository without leaving any undesired committed content - use this tool

BFG

https://rtyley.github.io/bfg-repo-cleaner/

enter image description here

Community
  • 1
  • 1
CodeWizard
  • 128,036
  • 21
  • 144
  • 167