FG

Rewrite git history to replace all CRLF to LF?

Fresh3 days ago
Mar 15, 202616465 views
Confidence Score0%
0%

Problem

I'm going to transfer a private Git repository from win32 box to Ubuntu. Though I can do a final dos2unix commit, but I'd like to rewrite the whole history, so some Git GUI will display log/diff correctly. E.g., gitg will insert empty lines for each CR/LF.

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Rewrite git history to replace all CRLF to LF?

Low Risk

You can use for that, with the option, and specifying for the branch. Here's an example (started in an empty directory with a Unix-type text file: Preparation: The command: Output: I strongly recommend doing a full backup beforehand. Running that fr…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment