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