Cache .git versus persist_to_workspace

Please note that the checkout step is currently broken when caching the .git directory and you try to build a tag: