How can I discard modified files?

By entering these commands in succession.

git stash
git stash drop

git stash stores modified files on a stack for later retrieval.

git stash drop discards them.


It happens because the linux kernel includes files with the same name (but different cases):

include/linux/netfilter/xt_connmark.h 
include/linux/netfilter/xt_CONNMARK.h

You can use:

git checkout .

To understand the difference between git checkout and git reset refer to the following question :

What's the difference between "git reset" and "git checkout"?


A git reset --hard HEAD should solve the problem.

Tags:

Git