Can You Have Git Repos On Vm And Local Machine?

Can You Have Git Repos On Vm And Local Machine? For such software, an additional repository, local to the VM, can be introduced providing a Git repository within the VM but outwith the shared folder, which nevertheless can push and pull changes to and from the shared folder repository. Can I have local git repository?