Cloning a git repo, and it already has a dirty working directory... Whaaaaa?

Which OS are you using? This error is caused by your filesystem not being case sensitive, like the default on Mac OS X.


So, you've checked out linux sources on a filesystem that isn't case sensitive. That's the problem. Try checking out on ext2 partition.

As a workaround you can also use git sparsecheckout feature:

git config core.sparsecheckout true
echo /* > .git/info/sparse-checkout 
echo !include/linux/netfilter/ > .git/info/sparse-checkout 
echo !include/linux/netfilter_ipv4/ > .git/info/sparse-checkout 
echo !include/linux/netfilter_ipv6/ > .git/info/sparse-checkout 
echo !net/ipv4/netfilter/ > .git/info/sparse-checkout 
echo !net/netfilter > .git/info/sparse-checkout
git read-tree --reset -u HEAD

Tags:

Git