Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using git "inside" or "outside" virtual machine? [closed]

I'm about to start a project with new coworkers and we're trying to find the best way to set up our work environnements.

We're using Vagrant and Virtual Box to work on the same environnement and about git, we were wondering if it was best to install git inside the VM and push commits from here or simply use git on our local OS in the Vagrant shared folders.

What do you guys usually do when working on a team?

like image 839
rrolt Avatar asked Sep 29 '22 13:09

rrolt


1 Answers

I pretty much always use Git outside of the virtual machine. That way, there is no important state within the VM, and I can throw it away and rebuild it, or revert to a snapshot, or something of the sort, without worrying about losing any unpushed state, stashes, uncommitted files, and the like.

like image 67
Brian Campbell Avatar answered Oct 05 '22 06:10

Brian Campbell