Gitignore Android device will not ignore .iml

Iv'e added:

*.iml 

for all gitignore files in my project. They are still tracked, even after they have completed .gitignore.

+6
source share
2 answers

git will track files sometimes, even if you add a file that should not be tracked in .gitignore

In this case, you must first delete the cache and then add everything.

Important: commit current changes

git rm -r --cached.

git add.

git commit -m "file tracking - changed"

+23
source

When you add them once, they will be tracked!

You should get all the commits to where you ran the .iml files.

Here is a good post in SF about republishing git commits: How do I get the Git repository back to a previous commit?

0
source

Source: https://habr.com/ru/post/984544/


All Articles