Removing swap files from your git project

Submitted by barnettech on

git ls-files | grep '\.swo$' | xargs git rm -f

and

git ls-files | grep '\.swp$' | xargs git rm -f