cat - >~/.gitignore <<EOF
*~
*.swp
*.swo
EOF
git config --global core.excludesfile ~/.gitignore
git-mnfss() {
git rm --cached -r -- $1
git read-tree --prefix $1/ $1
git checkout-index -fua
git clean -f -- $1
git reset --soft $(echo "Merge branch $1" | git commit-tree $(git write-tree) -p HEAD -p $1)
}