-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Building Git
We build Git for Windows using an MSYS2 based Git for Windows SDK. This SDK can be installed via the SDK installer
- Just run the SDK installer.
-
An initial
git cloneandmakeshould have already occurred when running the SDK installer. -
Open the Git for Windows SDK MinGW shell by double clicking either the Shortcut on the desktop
Git SDK 32-bit.lnkor by double clickingmingw32_shell.batin the install folder. That isGit SDK 64-bit.lnkandmingw64_shell.batfor the64bitSDK installer. -
Change directory to the initial clone:
cd /usr/src/git. -
(Optional) build Git:
make install -
Run the test suite:
make test. If you are a fan of statistics, you can use the followingproveinvocation to run the testsuite. But first we have to change to the test directory with the commandcd t. After that you can issue/usr/bin/time prove -j 15 --state=failed,save ./t[0-9]*.sh. If 15 threads are too many for your system, you can provide the number of threads via the-j <num>(j for jobs) parameter.
Once the SDK built Git, it is very easy to build another revision of Git, such as per a different branch or Pull Request.
- open the Git Bash of the SDK unless it is still open: execute the
git-bash.exebinary in the top-level directory of the SDK, - switch the working directory:
cd /usr/src/git, - fetch the Pull Request's revision or the branch:
- if you want to test a Pull Request, call
git fetch origin refs/pull/<id>/head, where<id>is the number of the Pull Request (e.g. if you want to test Pull Request #606, you would callgit fetch origin refs/pull/606/head), - if you want to test a custom branch, call
git fetch <url> <branch>instead, where<url>is the URL of the repository and<branch>is the name of the branch to test (e.g. if you wanted to test @dscho'scool-new-featurebranch, you would callgit fetch https://github.com/dscho/git cool-new-feature), - check out the revision that was just fetched:
git checkout FETCH_HEAD, - continue as above either by
make installormake test.
cd /usr/src/git
git pull
make -j15 install install-htmlAs before:
cd /usr/src/git/t
/usr/bin/time prove -j 5 --state=failed,save ./t[0-9]*.shSingle tests, block of tests, or the whole test suite can be run, as detailed in Running Git's regression-tests
TODO: mention good practices to develop using Eclipse, MSVC
This wiki page has been retired. All it did was to point to Git for Windows' governance model.