Created
December 6, 2016 15:31
-
-
Save stutrek/5ab23a0e05ce391e251e83b769c4079e to your computer and use it in GitHub Desktop.
git whitespace config
This file contains 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
#!/bin/bash | |
Smudge=$(git config --global filter.tabspace.smudge) | |
echo $Smudge; | |
if [ "$Smudge" == '' ]; then | |
git config --global filter.tabspace.smudge 'unexpand -t 4' | |
git config --global filter.tabspace.clean 'expand -t 4' | |
git config --global filter.tabspace2.smudge 'unexpand -t 2' | |
git config --global filter.tabspace2.clean 'expand -t 2' | |
git checkout HEAD -- ** | |
else | |
echo 'not adding git settings' | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment