Skip to content

Commit 49d647e

Browse files
committed
fixup! README.md: Add a Windows-specific preamble
Add a section instructing developers how to build, and how to test the just-built executables in-place. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent c0919c9 commit 49d647e

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,39 @@ for Windows' [Google Group](http://groups.google.com/group/git-for-windows),
1515
and [contribute bug
1616
fixes](https://github.com/git-for-windows/git/wiki/How-to-participate).
1717

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+
1851
Git - fast, scalable, distributed revision control system
1952
=========================================================
2053

0 commit comments

Comments
 (0)