SyntaxFix
Write A Post
Hire A Developer
Questions
As you are not trying to move the files around in the tree, you should be able to just checkout the directory:
git checkout master -- dirname