git subrepo branch foo/bar git clean foo/bar ls .git/tmp/subrepo/ still contains foo. bar has been removed. Honestly if subrepo or tmp are empty they should be removed also.