|
1 |
| -[](https://github.com/git/git/actions?query=branch%3Amaster+event%3Apush) |
| 1 | +Git for Windows |
| 2 | +=============== |
| 3 | + |
| 4 | +[](https://github.com/git-for-windows/git/actions?query=branch%3Amaster+event%3Apush) |
| 5 | +[](https://gitter.im/git-for-windows/git?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) |
| 6 | + |
| 7 | +This is [Git for Windows](http://git-for-windows.github.io/), the Windows port |
| 8 | +of [Git](http://git-scm.com/). |
| 9 | + |
| 10 | +The Git for Windows project is run using a [governance |
| 11 | +model](http://git-for-windows.github.io/governance-model.html). If you |
| 12 | +encounter problems, you can report them as [GitHub |
| 13 | +issues](https://github.com/git-for-windows/git/issues), discuss them on Git |
| 14 | +for Windows' [Google Group](http://groups.google.com/group/git-for-windows), |
| 15 | +and [contribute bug |
| 16 | +fixes](https://github.com/git-for-windows/git/wiki/How-to-participate). |
| 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. In this instance, you will want to prepend that portable Git's |
| 33 | + `/cmd` directory to the `PATH`, or test by running that portable Git's |
| 34 | + `git-bash.exe` or `git-cmd.exe`. |
| 35 | +- If you built using a recent Visual Studio, you can use the menu item |
| 36 | + `Build>Install git` (you will want to click on `Project>CMake Settings for |
| 37 | + Git` first, then click on `Edit JSON` and then point `installRoot` to the |
| 38 | + `mingw64` directory of an already-unpacked portable Git). |
| 39 | + |
| 40 | + As in the previous bullet point, you will then prepend `/cmd` to the `PATH` |
| 41 | + or run using the portable Git's `git-bash.exe` or `git-cmd.exe`. |
| 42 | +- If you want to run the built executables in-place, but in a CMD instead of |
| 43 | + inside a Bash, you can run a snippet like this in the `git-bash.exe` window |
| 44 | + where Git was built (ensure that the `EOF` line has no leading spaces), and |
| 45 | + then paste into the CMD window what was put in the clipboard: |
| 46 | + |
| 47 | + ```sh |
| 48 | + clip.exe <<EOF |
| 49 | + set GIT_EXEC_PATH=$(cygpath -aw .) |
| 50 | + set PATH=$(cygpath -awp ".:contrib/scalar:/mingw64/bin:/usr/bin:$PATH") |
| 51 | + set GIT_TEMPLATE_DIR=$(cygpath -aw templates/blt) |
| 52 | + set GITPERLLIB=$(cygpath -aw perl/build/lib) |
| 53 | + EOF |
| 54 | + ``` |
| 55 | +- If you want to run the built executables in-place, but outside of Git for |
| 56 | + Windows' SDK, and without an option to set/override any environment |
| 57 | + variables (e.g. in Visual Studio's debugger), you can call the Git executable |
| 58 | + by its absolute path and use the `--exec-path` option, like so: |
| 59 | +
|
| 60 | + ```cmd |
| 61 | + C:\git-sdk-64\usr\src\git\git.exe --exec-path=C:\git-sdk-64\usr\src\git help |
| 62 | + ``` |
| 63 | +
|
| 64 | + Note: for this to work, you have to hard-link (or copy) the `.dll` files from |
| 65 | + the `/mingw64/bin` directory to the Git worktree, or add the `/mingw64/bin` |
| 66 | + directory to the `PATH` somehow or other. |
| 67 | +
|
| 68 | +To make sure that you are testing the correct binary, call `./git.exe version` |
| 69 | +in the Git worktree, and then call `git version` in a directory/window where |
| 70 | +you want to test Git, and verify that they refer to the same version (you may |
| 71 | +even want to pass the command-line option `--build-options` to look at the |
| 72 | +exact commit from which the Git version was built). |
2 | 73 |
|
3 | 74 | Git - fast, scalable, distributed revision control system
|
4 | 75 | =========================================================
|
@@ -29,14 +100,15 @@ CVS users may also want to read [Documentation/gitcvs-migration.txt][]
|
29 | 100 | (`man gitcvs-migration` or `git help cvs-migration` if git is
|
30 | 101 | installed).
|
31 | 102 |
|
32 |
| -The user discussion and development of Git take place on the Git |
| 103 | +The user discussion and development of core Git take place on the Git |
33 | 104 | mailing list -- everyone is welcome to post bug reports, feature
|
34 | 105 | requests, comments and patches to [email protected] (read
|
35 | 106 | [Documentation/SubmittingPatches][] for instructions on patch submission).
|
36 | 107 | To subscribe to the list, send an email with just "subscribe git" in
|
37 | 108 | the body to [email protected]. The mailing list archives are
|
38 | 109 | available at <https://lore.kernel.org/git/>,
|
39 | 110 | <http://marc.info/?l=git> and other archival sites.
|
| 111 | +The core git mailing list is plain text (no HTML!). |
40 | 112 |
|
41 | 113 | Issues which are security relevant should be disclosed privately to
|
42 | 114 | the Git Security mailing list <[email protected]>.
|
|
0 commit comments