Invalid solution to adding .gitignore to the .idea directory of IntelliJ IDEA

The reason is invalid: the corresponding directory or file has been submitted before and has been tracked by git, so adding .gitignore is invalid. .

The following solution is only applicable to this situation, you need to go to the server to verify.

Solution

git rm -rf .idea; 
git commit -m "delete .idea"; 
git push;

If the prompt file has been modified, you can cache it, or directly -f force deletion:

 git rm --cached DayTest.iml;
 git rm -f DayTest.iml;

 

 

 

 

After confirming that the files in the warehouse are deleted

add ignore

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324394290&siteId=291194637