@
Existing issues matching what you're seeing
Git for Windows version
git version 2.54.0.windows.1
cpu: x86_64
built from commit: 2b8a3ab140826ac423c2845ef81d4c6ac4f7bf3c
shell-path: D:/git-sdk-64-build-installers/usr/bin/sh
libcurl: 8.19.0
OpenSSL: OpenSSL 3.5.6 7 Apr 2026
zlib: 1.3.2
default-ref-format: files
default-hash: sha1
Windows version
Windows 11
Windows CPU architecture
x86_64 (64-bit)
Additional Windows version information
Microsoft Windows [Version 10.0.26200.8655]
Options set during installation
Editor Option: VisualStudioCode
Default Branch Option: main
Path Option: Cmd
SSH Option: OpenSSH
CURL Option: WinSSL
CRLF Option: CRLFAlways
Bash Terminal Option: MinTTY
Git Pull Behavior Option: Merge
Use Credential Manager: Enabled
Performance Tweaks FSCache: Enabled
Enable Symlinks: Enabled
Enable FSMonitor: Disabled
Other interesting things
Monorepo with 20+ submodules, mixed LF/CRLF content (markdown, JSON, YAML, PowerShell, Bash) shipped on Windows machines and Linux CI.
Terminal/shell
Git Bash (MinTTY) and PowerShell 7
Commands that trigger the issue
# on a freshly cloned repo with default core.autocrlf=true (installer default "CRLFAlways")
$ echo hello > new.txt
$ git add new.txt
warning: in the working copy of 'new.txt', LF will be replaced by CRLF the next time Git touches it
Every git add/git commit on a repo with any LF-only files fires N warnings, one per file. On a batch commit of 40 files that's 40 warning lines drowning the actual output. Real repro from today: adding a normal README.md in a mixed-endings monorepo produces ~30 lines of these before the commit summary appears.
Expected behaviour
I know Git is going to normalise; I chose core.autocrlf=true on purpose; I have a .gitattributes. I want a single documented knob to silence just this advice per repo (or globally) without disabling the normalisation:
git config advice.crlfWillReplace false
…analogous to the existing advice.* family (advice.detachedHead, advice.pushNonFastForward, advice.statusHints, etc). See git-config(1) "advice.*".
Actual behaviour
There is no advice.* knob for this message. Workarounds are all worse than the noise:
core.safecrlf=false — silences the warning but also disables the "irreversible normalisation" safety check, which is the wrong trade. Users who want the advice off almost never want that safety off.
2>/dev/null on every git call — buries real errors too.
.gitattributes per-file with text / -text — mitigates for listed paths but doesn't globally quiet the advice; still fires for anything not covered.
core.autocrlf=input — changes the behaviour, not just the noise. The user wanted true, that's why they picked it in the installer.
Repository
Reproducible on any Windows clone of a Linux-authored repo. Minimal repro:
git init test && cd test
git config core.autocrlf true
git config core.safecrlf true
printf 'line1\nline2\n' > a.txt
git add a.txt # ← fires the warning
Proposed fix
Add advice.crlfWillReplace (bool, default true) gating the warning: in the working copy of 'X', LF will be replaced by CRLF … message in convert.c (the emitter is around check_safe_crlf / the SAFE_CRLF_WARN code path). This is a ~5-line change, backward-compatible: default true preserves current output; users who set false see the safety check still run but stop being spammed.
Precedent: essentially every other repeated Git advice line got an advice.* toggle by now — this one didn't, and Windows users are the biggest consumers of core.autocrlf=true so we feel it worst.
Happy to attempt a PR against the upstream git/git repo if a maintainer agrees the knob is welcome.
@
@
Existing issues matching what you're seeing
advice.crlfWillReplace(or similarly named) config exists today.Git for Windows version
Windows version
Windows 11
Windows CPU architecture
x86_64 (64-bit)
Additional Windows version information
Options set during installation
Other interesting things
Monorepo with 20+ submodules, mixed LF/CRLF content (markdown, JSON, YAML, PowerShell, Bash) shipped on Windows machines and Linux CI.
Terminal/shell
Git Bash (MinTTY) and PowerShell 7
Commands that trigger the issue
Every
git add/git commiton a repo with any LF-only files fires N warnings, one per file. On a batch commit of 40 files that's 40 warning lines drowning the actual output. Real repro from today: adding a normalREADME.mdin a mixed-endings monorepo produces ~30 lines of these before the commit summary appears.Expected behaviour
I know Git is going to normalise; I chose
core.autocrlf=trueon purpose; I have a.gitattributes. I want a single documented knob to silence just this advice per repo (or globally) without disabling the normalisation:…analogous to the existing
advice.*family (advice.detachedHead,advice.pushNonFastForward,advice.statusHints, etc). See git-config(1) "advice.*".Actual behaviour
There is no
advice.*knob for this message. Workarounds are all worse than the noise:core.safecrlf=false— silences the warning but also disables the "irreversible normalisation" safety check, which is the wrong trade. Users who want the advice off almost never want that safety off.2>/dev/nullon every git call — buries real errors too..gitattributesper-file withtext/-text— mitigates for listed paths but doesn't globally quiet the advice; still fires for anything not covered.core.autocrlf=input— changes the behaviour, not just the noise. The user wantedtrue, that's why they picked it in the installer.Repository
Reproducible on any Windows clone of a Linux-authored repo. Minimal repro:
Proposed fix
Add
advice.crlfWillReplace(bool, default true) gating thewarning: in the working copy of 'X', LF will be replaced by CRLF …message inconvert.c(the emitter is aroundcheck_safe_crlf/ theSAFE_CRLF_WARNcode path). This is a ~5-line change, backward-compatible: defaulttruepreserves current output; users who setfalsesee the safety check still run but stop being spammed.Precedent: essentially every other repeated Git advice line got an
advice.*toggle by now — this one didn't, and Windows users are the biggest consumers ofcore.autocrlf=trueso we feel it worst.Happy to attempt a PR against the upstream
git/gitrepo if a maintainer agrees the knob is welcome.@