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