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.
vagrant up
in the /
directory of msysGitvagrant 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/
directory inside the virtual machine is the /
directory of the hosting msysGit.
To compile and install Git, you will have to run make clean
first because msysGit will have built Windows binaries in the same directory (when we will need Linux binaries inside the virtual machine started by Vagrant). After calling make install
and export PATH=$HOME/bin:$PATH
you will be able to run the Git version built from the source files in /vagrant/git/
.
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
/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::I18N.3pm
) which is not allowed on Windows file systems.git svn
is very slow. Actually, git svn
is not very slow. But it is if you run it inside a directory under /vagrant/
. The reason is that Linux' superior file system performance cannot come to full play when accessing /vagrant/
-- which really is the msysGit root directory managed by Windows. If you want to benefit from Linux' performance characteristics, you will have to perform the time-critical operations either in /home/vagrant/
inside the virtual machine, or inside a tmpfs.Linux offers a plethora of file systems optimized for different use cases. One of them is tmpfs
, a RAM-based file system which keeps all files in virtual memory and is therefore very fast (but does not persist any of the data to disk).
Using such a file system can speed up Git operations quite substantially, in particular when performing disk-intensive operations, such as git filter-branch
, git gc
or git svn
. It is very easy to create a tmpfs
-backed file system:
mkdir -p $HOME/tmp sudo mount -t tmpfs -o size=10G tmpfs $HOME/tmp cd $HOME/tmp
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4