How can I commit source file even if it consists error(s)

I'm using Git within IntelliJ Idea 11. I'm trying to commit a source file that contains errors. (The errors aren't critical and happens because of IDE's specific controls)
When I try to commit & push it; I get this error : "src has local modifications (use --cached to keep the file, or -f to force removal)"

Waiting your helps,
Thanks in advance.

Comment actions Permalink


> source file that contains errors
> has local modifications

These things do not look related. If you remove the error and keep the file modified, does the issue still occurs? If yes, then errors do not matter.


Comment actions Permalink

Thanks for your interest. Actually as you mentioned the problem has occured because previous versions. I had the same file with uppercase file name. So first I deleted the file from version control; then I added it again.
Now there's no problem.

Again thanks for your time & interest.
With regards,


Please sign in to leave a comment.