Last active
August 3, 2017 19:52
-
-
Save nicoddemus/9f3ff45e59b4cb1f884fa2dd4c1d2ecd to your computer and use it in GitHub Desktop.
Normalize line endings in repository based on .gitattributes from etk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
if not exist ..\etk ( | |
echo Could not find ..\etk | |
exit /b 1 | |
) | |
copy ..\etk\.gitattributes . | |
if errorlevel 1 exit /b 1 | |
git add .gitattributes | |
if errorlevel 1 exit /b 1 | |
git commit -anm "Add .gitattributes file" --author "Dev" | |
if errorlevel 1 exit /b 1 | |
git rm --cached -r . | |
if errorlevel 1 exit /b 1 | |
git diff --cached --name-only -z | xargs -0 git add -f | |
if errorlevel 1 exit /b 1 | |
git commit -nm "Normalize all line endings" --author "Dev" | |
if errorlevel 1 exit /b 1 | |
echo Please push your changes. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment