git fetch -p && for branch in `git branch -vv | grep ': gone]' | awk '{print $1}'`; do git branch -D $branch; done
https://gist.github.com/StuPig/06736fbdeede11001aff
功能比cp强大
rsync -av --progress sourcefolder /destinationfolder --exclude thefoldertoexclude
git checkout . && git clean -xdf