Andrey Bushman
Andrey Bushman

Reputation: 12506

Can I suppress the messages that "LF will be replaced by CRLF"?

Can I suppress such messages in the console of Git Bash (the output of the git commit command)?

warning: LF will be replaced by CRLF in 1.txt.
The file will have its original line endings in your working directory.

The --quiet option doesn't do it.

Upvotes: 0

Views: 614

Answers (1)

hjpotter92
hjpotter92

Reputation: 80639

Disable the safecrlf configuration:

git config core.safecrlf false

core.safecrlf

If true, makes Git check if converting CRLF is reversible when end-of-line conversion is active. Git will verify if a command modifies a file in the work tree either directly or indirectly. For example, committing a file followed by checking out the same file should yield the original file in the work tree. If this is not the case for the current setting of core.autocrlf, Git will reject the file. The variable can be set to "warn", in which case Git will only warn about an irreversible conversion but continue the operation.

Upvotes: 2

Related Questions