git snips
 

removing entire subdirectories from current branch (including history)

cd gitrepo
git filter-branch --index-filter 'git-ls-files DIR1 DIR2 DIR3 | xargs -d "\n" git-update-index --remove' HEAD

where DIR1, DIR2, DIR3 are subdirectory names
after that you'd likely to issue command:

rm -rf .git-rewrite .git/refs/original

hackish way of merging single subdirectory to different branch

git rm --cached DIR
git commit
git add DIR
git commit

after that you'll get a commit which contains only this one single subdirectory, and can use git cherry-pick

overwrite last commit and edit it's comment

git commit -a --amend