This is a special case, where we want to delete the sub-content of the folder but not the folder itself, otherwise
`dir.removeRecursively()` can be directly used.

Also, we can't have a workspace / git depend on each other. It can be surely be extracted out as a utility method, but I do not see value at present.