From 08582c495aa688c92e9e96adc2e4e8edb90193bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Sun, 14 Aug 2016 09:13:32 +0200 Subject: [PATCH] GIT EOL normalization script --- git_eol_normalization.bat | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 git_eol_normalization.bat diff --git a/git_eol_normalization.bat b/git_eol_normalization.bat new file mode 100644 index 000000000..29814c402 --- /dev/null +++ b/git_eol_normalization.bat @@ -0,0 +1,19 @@ +git add . -u +@if %errorlevel% neq 0 goto failed +git commit -m "Saving files before refreshing line endings" +@if %errorlevel% neq 0 goto failed +git rm --cached -r . +@if %errorlevel% neq 0 goto failed +git reset --hard +@if %errorlevel% neq 0 goto failed +git add . +@if %errorlevel% neq 0 goto failed +git commit -m "Normalize all the line endings" +@rem No errorlevel check here - the commit can be empty +@goto okay +:failed +@echo "ERROR: Something FAILED" +@goto finish +:okay +@echo "SUCCESS" +:finish \ No newline at end of file