Skip to content

Instantly share code, notes, and snippets.

@stutrek
Created December 6, 2016 15:31
Show Gist options
  • Save stutrek/5ab23a0e05ce391e251e83b769c4079e to your computer and use it in GitHub Desktop.
Save stutrek/5ab23a0e05ce391e251e83b769c4079e to your computer and use it in GitHub Desktop.
git whitespace config
#!/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