-
Notifications
You must be signed in to change notification settings - Fork 21
Vagrant
Vagrant is a modern way to define the requirements of a project. In the case of msysGit, it allows us to set up a minimal virtual Linux machine for trying out/using Linux Git on Windows without much effort.
Note: while Vagrant makes things easy, quite a bit of bandwidth is required for the initial steps: in total, roughly a gigabyte will need to be downloaded to get started.
- Download and install VirtualBox
- Download and install Vagrant
- Run
vagrant upin the/git/directory of msysGit - Run
vagrant ssh
Note that the prompt shows that the current directory in the ssh session inside the virtual machine is /vagrant/git and that the files in that directory are suspiciously identical to the /git/ directory in your msysGit installation. This is not by accident. In fact, the /vagrant/git directory inside the virtual machine is the /git/ directory of the hosting msysGit.
Git was invented to work with Linux. Over the years, it has become more and more platform-independent, but still support for Linux outshines support for every other platform, including Windows. Therefore it is preferable under certain circumstances to run Git inside Linux in a virtual machine, for example
- for finding out whether a bug is Windows-specific or not
- for performance (Linux' filesystem and memory management is better than Windows')
- for proper 64-bit support (msysGit -- as of 1.8.5.2 -- does not support 64-bit binaries)
- for current Subversion bindings (it is notoriously hard to compile Subversion bindings into MSys' Perl)
- etc
- The Linux version of Git was designed to run on Linux file systems. Vagrant exposes msysGit's root directory as
/vagrant/but of course it cannot make up for the Windows file system's lack of support for Unix-style file permissions nor case-sensitive file names. As a consequence, quite a few of the unit tests fail when run in-place. - Git cannot be built with Perl's MakeMaker using Vagrant: it tries to create files with double colons in their name (e.g.
Git::I18N.3pm) which is not allowed on Windows file systems.