Questions tagged [core.autocrlf]

core.autocrlf is a configuration setting for Git controlling automatic conversion of line endings.

core.autocrlf is a configuration setting for . It controls whether or not automatic conversion of line-endings should happen in the working directory.

In the manual for git-config, the option is described like this:

Setting this variable to "true" is almost the same as setting the text attribute to "auto" on all files except that text files are not guaranteed to be normalized: files that contain CRLF in the repository will not be touched. Use this setting if you want to have CRLF line endings in your working directory even though the repository does not have normalized line endings. This variable can be set to input, in which case no output conversion is performed.

133 questions
0
votes
0 answers

Can't unmodify files in git

When I merged with another branch, a few of my files became modified automatically. I tried to checkout -- on the files, but git status still shows them as modified. I then tried a custom shell function that normally fixes these kinds of problems…
Trevor Hickey
  • 31,728
  • 22
  • 131
  • 236
0
votes
0 answers

git eol, reset, and strange behavior

I'm using git on Windows 2.9.3.windows.1 I cloned my repository and noticed that without doing anything a set of files in a particular directory were modified. I figured it was some problem with code.autocrlf (set to true by default on Windows). …
0
votes
0 answers

Git ignores autocrlf config flag

I'm trying to contribute to a git project whose source files have CRLF line endings. When cloning the project, git immediately marks all the source files as modified. My config is: $ git config…
digory doo
  • 1,398
  • 17
  • 30
0
votes
0 answers

With core.autocrlf=true, why does git log -p show ^M line endings?

Deleted line does not have this ending. Only the added one. Am I missing another setting? Is CRLF in the repo? Commit was created by IDE, I use default git+bash installation on Windows for git log.
sevo
  • 4,471
  • 1
  • 11
  • 30
0
votes
1 answer

Can I make Git's core.autocrlf ignore a file?

Is there a way to make Git's core.autocrlf ignore a specific file? I'm working on a Linux project with some people who are on Windows and we have this bash script in the repository that is executed on a virtual machine (Vagrant + VirtualBox) during…
Danilo Carvalho
  • 375
  • 2
  • 10
0
votes
2 answers

For a pure Windows project, why would I possibly want automatic line end mutilations?

As the title says. All devs for this project are on windows. The software is going to run on windows. Why would I set autocrlf to true?
Kempeth
  • 1,756
  • 2
  • 18
  • 34
0
votes
1 answer

Git says I am adding '^M' but core.autocrlf is true

The problem is simple enough. Git is saying I've added CR (^M) to a file, me@myComp MINGW64 /c/workspace/service (develop) $ git diff --check engine/src/main/java/someFile.java:18: trailing whitespace. +import some.java.package;^M but I have…
Captain Man
  • 5,651
  • 3
  • 41
  • 64
0
votes
0 answers

Cannot add files to GitHub through Android Studio version control system (LF replace CRLF)

I'm using Android Studio and I have around 3 files that cannot be added to my commits to GitHub because when I try (VCS > Git > +Add) I get this error: Error Adding Files The following problems have occurred when adding the files: fatal: CRLF would…
AlleyOOP
  • 1,237
  • 3
  • 17
  • 32
0
votes
0 answers

Can't get rid of unwanted file change

First, my develop is clear, git status is clear. When I do pull origin develop followed by git status, it's shown below On branch develop Your branch is up-to-date with 'origin/develop'. Changes not staged for commit: (use "git add ..."…
wanghao
  • 2,229
  • 2
  • 15
  • 13
0
votes
2 answers

git replace local branch with remote branch

I have set the property "core.autocrlf" to "input" so that CRLF line endings are replaced by LF ones on commit. How can I replace the local branch in git with the remote branch so that all files in the local git repository have the line ending LF as…
Chris
  • 89
  • 1
  • 10
-1
votes
1 answer

Can't disable autocrlf using .gitattributes

I have a directory called "test" in which I've placed some text files with various line endings. The trouble is Git for Windows insists on converting the file with LF line endings to CRLF because autocrlf is enabled. To try and get around this I've…
Simon Morgan
  • 1,553
  • 4
  • 17
  • 30
-1
votes
1 answer

How to set line-endings in git for local copy

I'm working on a project where we pull repos then check for various legal issues. I cannot modify the external projects, but do have complete control over my local machine (Ubuntu). Am running into line-ending issues and wondering if there's a a way…
-1
votes
2 answers

Rails 4 create LF files on Windows. I couldn't commit this in Git

I created a new rails app. rails new myfirstapp It have created files with LF only. I tried to init git repo. git init and after git add . I got this error: fatal: LF would be replaced by CRLF in .gitignore My git…
1 2 3
8
9