-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Compiling Git with Visual Studio
Please note: this page describes how to compile Git's source code in Visual Studio 2015 or later.
Git's source code (and hence also Git for Windows' source code) is usually built using GNU C and GNU Make in a Git for Windows SDK.
However, as of Git for Windows v2.11.0, a much more convenient way is available: by cloning https://github.com/git-for-windows/git and checking out the vs/master branch, you will automatically have project definitions ready to go with Visual Studio.
Simply open the git.sln file and build the solution.
When building Git in Visual Studio, you do not actually need a full-blown Git for Windows SDK. Simply install Git for Windows, make sure that the entire solution was built, open a Git Bash and run the tests in the t/ subdirectory.
To test, say, the interactive rebase functionality, simply run the appropriate test (the file names are pretty self-explanatory):
sh t3404-rebase-interactive.shIf you need much more verbose output, e.g. when a test is failing, use the -i -v -x options:
bash t3404-rebase-interactive.sh -i -v -xYou can use the prove tool (which mostly works reliably, sometimes you will see that a test exited "dubiously" but running it again individually would not show any signs of failure...):
prove --timer --jobs 15 ./t[0-9]*.shThis wiki page has been retired. All it did was to point to Git for Windows' governance model.