Skip to content
Permalink
Browse files

Normalize all the line endings

  • Loading branch information
jindrapetrik committed Aug 14, 2016
1 parent 5b9c683 commit 0121eb171b30e3249473223f86bc0fdcece5981d
Showing with 22 additions and 0 deletions.
  1. +22 −0 git_eol_normalization.bat
@@ -0,0 +1,22 @@
@echo This will normalize line endings in the GIT repository
@pause
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
@pause

0 comments on commit 0121eb1

Please sign in to comment.
You can’t perform that action at this time.