I have just one cs file in my repository which Git seems to think is binary. (In git gui, it just says “binary files differ”.)
How can I indicate to Git that my cs file is a text file?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could try and set your cs files as text in a
.gitattributesfile.(as described in the
.gitattributesman page)or try to diff them as text (
git diff --text)But if your .cs files are UTF-8 or UTF-16, this can be problematic, unless you set your
diffto use an external tool able to handle those encoding.