Last active
June 30, 2018 02:41
-
-
Save willnode/a6e76fcb9ac5d150df4a356b818a0ffe to your computer and use it in GitHub Desktop.
Normalize Line Ending in 1..2..3 (normalize == Platform Dependant) (normalize-lf == Force LF)
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 | |
| REM DO NOT USE THIS INSIDE THE FOLDER WHICH ALREADY HAS .GIT REPO | |
| IF EXIST .git ( | |
| echo THERE'S A .GIT FOLDER!!! Aborting. | |
| ) ELSE ( | |
| git init | |
| echo * text=auto eol=lf>.gitattributes | |
| git add -A | |
| git commit -m "Init the Dummy" | |
| git rm --cached -r . | |
| git reset --hard | |
| del /Q /F .gitattributes | |
| RD /S /Q .git | |
| ) |
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
| if [ ! -d ".git" ]; then | |
| git init | |
| echo * text=auto eol=lf>.gitattributes | |
| git add -A | |
| git commit -m "Init the Dummy" | |
| git rm --cached -r . | |
| git reset --hard | |
| rm -rf .gitattributes | |
| rm -rf .git | |
| fi |
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 | |
| REM DO NOT USE THIS INSIDE THE FOLDER WHICH ALREADY HAS .GIT REPO | |
| IF EXIST .git ( | |
| echo THERE'S A .GIT FOLDER!!! Aborting. | |
| ) ELSE ( | |
| git init | |
| git add -A | |
| git commit -m "Init the Dummy" | |
| git rm --cached -r . | |
| git reset --hard | |
| RD /S /Q .git | |
| ) | |
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
| if [ ! -d ".git" ]; then | |
| git init | |
| git add -A | |
| git commit -m "Init the Dummy" | |
| git rm --cached -r . | |
| git reset --hard | |
| rm -rf .git | |
| fi |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
THE TRICK: https://twitter.com/willnode/status/1008028258783264770