I’m fairly new to git, and I do development inside of a VM (Virtual Machine). Assume I’m setting up or working with repos on GitHub.
I’m curious about the efficacy of different workflows I could employ. I see three off-hand:
GitHub -> VM; do work; VM -> GitHub
GitHub -> Host; copy files from host into VM; do work; copy files back to Host; Host -> GitHub
GitHub -> Host; Host ->VM; do work; VM -> Host; Host -> GitHub
Personally, I don’t like (1); historically, I backup all files from inside the VM to the Host, in case the VM crashes and I cannot recover anything inside of it.
So it boils down to whether I can use one tool (git) to move files between GitHub <–> Host and Host <–> VM, or if I use two different tools (eg., BeyondCompare to sync up Host and VM files).
Has anybody written up anything discussing the pros and cons of this situation. It seems like it would be common enough that there might be something around, but I haven’t found anything.
But if you’ve got any experience with this situation, I’d love to hear your findings and recommendations.