Last active
February 23, 2017 10:32
-
-
Save Muspi/2e728a5e8a5729497d05ff38ca9d582c to your computer and use it in GitHub Desktop.
Resolve EOL problem between while working with git repos on Windows and Linux
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
#Put this file on the repo root directory | |
* text=auto eol=lf | |
# Denote all files that are truly binary and should not be modified. | |
*.png binary | |
*.jpg binary | |
*.jpeg binary | |
*.ttf binary | |
*.eot binary | |
*.otf binary | |
*.woff binary | |
*.psd binary | |
*.woff2 binary | |
*.eps binary |
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
git add . -u | |
git commit -m "Sauvegarder vos modifications en cours" | |
# supprimer tous les fichiers versionnés dans git | |
git rm -r --cached . | |
# reprendre les fichiers tel qu'ils étaient avant la suppression. | |
C'est avec cette commande que git va changer toutes les EOF avec | |
ce que l'on a spécifié dans le .gitattributes | |
git checkout -- . | |
# Enregister le changement de ligne | |
git add . | |
$ git commit -m "Normalize all the line endings" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment