The reason is: 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
Solutions
git rm -rf .idea;
git commit -m "delete .idea";
git push;
If you are prompted that the file has been modified, you can cache it, or directly – f force delete it:
git rm --cached DayTest.iml;
git rm -f DayTest.iml;
Confirm to delete the warehouse file
Add more ignore
Similar Posts:
- Git ignore rule (.Gitignore configuration) does not Wrok [How to Fix]
- Sourcetree / git solves the problem of pre commit hook failed
- Updates were rejected because the remote contains work that you do
- After npm5, execute NPM cache clean and report an error
- How to Solve error: failed to push some refs to ‘xxxx’
- git this exceeds GitHub’s file size limit of 100.00 MB
- [Solved] error: failed to push some refs to ‘xxxx’
- WARNING: POSSIBLE DNS SPOOFING DETECTED [How to Solve]
- git:fatal: No configured push destination.