1

I am using Git Extension with development on Visual Studio.

In the commmit window, it is showing files which I haven't change. (Also those are not one or two line change but the change in complete file). While trying to reset changes by selecting that file nothing happens and that file appears again in unstage portion

Is this the issue with CRLF and LF ?

Nav Ali
  • 1,232
  • 6
  • 17
  • 26
  • "Is this the issue with CRLF and LF?" Probably. You can check with `git diff -w` – TimWolla Feb 12 '14 at 01:57
  • Yes that is the case. I am converting EOL to LF using Notepad++. When I reset my change after converting to LF, it reverts back to CRLF but files remain in unstage window. – Nav Ali Feb 12 '14 at 02:08
  • I am not familiar with the Git extension you might be using with VS, but Git itself has a configuration option that automatically deals with CRLF and LF woes. See the answer in http://stackoverflow.com/questions/1967370/git-replacing-lf-with-crlf – miqh Feb 12 '14 at 02:10
  • I am getting the following result on running the command given by you "warning: CRLF will be replaced by LF in [MyFile]. The file will have its original line endings in your working directory" – Nav Ali Feb 12 '14 at 02:14
  • 1
    @NavAli yes, Git displays that message to let you know that whenever you commit text files that they will have their line endings automatically adjusted to be stored in your repository as LF. This is particularly handy if you need the repository for development on other operating systems differing in treatment of line endings like Linux. – miqh Feb 12 '14 at 02:31
  • 1
    @NavAli Can you try with `git config core.autocrlf false`? – VonC Feb 12 '14 at 11:50
  • I just removed "* text=auto" from .gitattributes and it stop showing files with line ending change – Nav Ali Feb 13 '14 at 00:13

0 Answers0