@@ -15,6 +15,39 @@ for Windows' [Google Group](http://groups.google.com/group/git-for-windows),
15
15
and [ contribute bug
16
16
fixes] ( https://github.com/git-for-windows/git/wiki/How-to-participate ) .
17
17
18
+ To build Git for Windows, please either install [ Git for Windows'
19
+ SDK] ( https://gitforwindows.org/#download-sdk ) , start its ` git-bash.exe ` , ` cd `
20
+ to your Git worktree and run ` make ` , or open the Git worktree as a folder in
21
+ Visual Studio.
22
+
23
+ To verify that your build works, use one of the following methods:
24
+
25
+ - If you want to test the built executables within Git for Windows' SDK,
26
+ prepend ` <worktree>/bin-wrappers ` to the ` PATH ` .
27
+ - Alternatively, run ` make install ` in the Git worktree.
28
+ - If you need to test this in a full installer, run `sdk build
29
+ git-and-installer`.
30
+ - You can also "install" Git into an existing portable Git via `make install
31
+ DESTDIR=<dir >` where ` <dir >` refers to the top-level directory of the
32
+ portable Git.
33
+ - If you built using Visual Studio, you can use the menu item `Build>Install
34
+ git` (you will want to click on ` Project>CMake Settings for Git` first, then
35
+ click on ` Edit JSON ` and then point ` installRoot ` to the ` mingw64 ` directory
36
+ of an already-unpacked portable Git).
37
+ - If you want to run the built executables in-place, but in a CMD instead of
38
+ inside a Bash, you can run a snippet like this in the ` git-bash.exe ` window
39
+ where Git was built (ensure that the ` EOF ` line has no leading spaces), and
40
+ then paste what was put in the clipboard into the CMD window:
41
+
42
+ ``` sh
43
+ clip.exe << EOF
44
+ set GIT_EXEC_PATH=$( cygpath -aw .)
45
+ set PATH=$( cygpath -awp " .:contrib/scalar:/mingw64/bin:/usr/bin:$PATH " )
46
+ set GIT_TEMPLATE_DIR=$( cygpath -aw templates/blt)
47
+ set GITPERLLIB=$( cygpath -aw perl/build/lib)
48
+ EOF
49
+ ` ` `
50
+
18
51
Git - fast, scalable, distributed revision control system
19
52
=========================================================
20
53
0 commit comments