Skip to content

Commit a86d6d6

Browse files
dschoGit for Windows Build Agent
authored and
Git for Windows Build Agent
committedMar 19, 2025·
Merge 'readme' into HEAD
Add a README.md for GitHub goodness. Signed-off-by: Johannes Schindelin <[email protected]>
2 parents 5863f8d + 8e6109b commit a86d6d6

7 files changed

+764
-59
lines changed
 

‎.github/ISSUE_TEMPLATE.md

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
- [ ] I was not able to find an [open](https://github.com/git-for-windows/git/issues?q=is%3Aopen) or [closed](https://github.com/git-for-windows/git/issues?q=is%3Aclosed) issue matching what I'm seeing
2+
3+
### Setup
4+
5+
- Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
6+
7+
```
8+
$ git --version --build-options
9+
10+
** insert your machine's response here **
11+
```
12+
13+
- Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
14+
15+
```
16+
$ cmd.exe /c ver
17+
18+
** insert your machine's response here **
19+
```
20+
21+
- What options did you set as part of the installation? Or did you choose the
22+
defaults?
23+
24+
```
25+
# One of the following:
26+
> type "C:\Program Files\Git\etc\install-options.txt"
27+
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
28+
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
29+
> type "$env:USERPROFILE\AppData\Local\Programs\Git\etc\install-options.txt"
30+
$ cat /etc/install-options.txt
31+
32+
** insert your machine's response here **
33+
```
34+
35+
- Any other interesting things about your environment that might be related
36+
to the issue you're seeing?
37+
38+
** insert your response here **
39+
40+
### Details
41+
42+
- Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other
43+
44+
** insert your response here **
45+
46+
- What commands did you run to trigger this issue? If you can provide a
47+
[Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve)
48+
this will help us understand the issue.
49+
50+
```
51+
** insert your commands here **
52+
```
53+
- What did you expect to occur after running these commands?
54+
55+
** insert here **
56+
57+
- What actually happened instead?
58+
59+
** insert here **
60+
61+
- If the problem was occurring with a specific repository, can you provide the
62+
URL to that repository to help us with testing?
63+
64+
** insert URL here **

‎.github/PULL_REQUEST_TEMPLATE.md

+16-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
1-
Thanks for taking the time to contribute to Git! Please be advised that the
2-
Git community does not use github.com for their contributions. Instead, we use
3-
a mailing list (git@vger.kernel.org) for code submissions, code reviews, and
4-
bug reports. Nevertheless, you can use GitGitGadget (https://gitgitgadget.github.io/)
1+
Thanks for taking the time to contribute to Git!
2+
3+
Those seeking to contribute to the Git for Windows fork should see
4+
http://gitforwindows.org/#contribute on how to contribute Windows specific
5+
enhancements.
6+
7+
If your contribution is for the core Git functions and documentation
8+
please be aware that the Git community does not use the github.com issues
9+
or pull request mechanism for their contributions.
10+
11+
Instead, we use the Git mailing list (git@vger.kernel.org) for code and
12+
documentation submissions, code reviews, and bug reports. The
13+
mailing list is plain text only (anything with HTML is sent directly
14+
to the spam folder).
15+
16+
Nevertheless, you can use GitGitGadget (https://gitgitgadget.github.io/)
517
to conveniently send your Pull Requests commits to our mailing list.
618

719
For a single-commit pull request, please *leave the pull request description

‎ARCHITECTURE.md

+130
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# Architecture of Git for Windows
2+
3+
Git for Windows is a complex project.
4+
5+
## What _is_ Git for Windows?
6+
7+
### A fork of `git/git`
8+
9+
First and foremost, it is a friendly fork of [`git/git`](https://github.com/git/git), aiming to improve Git's Windows support. The [`git-for-windows/git`](https://github.com/git-for-windows/git) repository contains dozens of topics on top of `git/git`, some awaiting to be "upstreamed" (i.e. to be contributed to `git/git`), some still being stabilized, and a few topics are specific to the Git for Windows project and are not intended to be integrated into `git/git` at all.
10+
11+
### Enhancing and maintaining Git's support for Windows
12+
13+
On the source code side, Git's Windows support is made a bit more tricky than strictly necessary by the fact that Git does not have any platform abstraction layer (unlike other version control systems, such as Subversion). It relies on the presence of POSIX features such as the `hstrerror()` function, and on platforms lacking that functionality, Git provides shims. That leads to some challenges e.g. with the `stat()` function which is very slow on Windows because it has to collect much more metadata than what e.g. the very quick `GetFileAttributesExW()` Win32 API function provides, even when Git calls `stat()` merely to test for the presence of a file (for which all that gathered metadata is totally irrelevant).
14+
15+
### Providing more than just source code
16+
17+
In contrast to the Git project, Git for Windows not only publishes tagged source code versions, but full builds of Git. In fact, Git for Windows' primary purpose, as far as most users are concerned, is to provide a convenient installer that end-users can run to have Git on their computer, without ever having to check out `git-for-windows/git` let alone build it. In essence, Git for Windows has to maintain a separate project altogether in addition to the fork of `git/git`, just to build these release artifacts: [`git-for-windows/build-extra`](https://github.com/git-for-windows/build-extra). This repository also contains the definition for a couple of other release artifacts published by Git for Windows, e.g. the "portable" edition of Git for Windows which is a self-extracting 7-Zip archive that does not need to be installed.
18+
19+
### A software distribution, really
20+
21+
Another aspect that contributes to the complexity of Git for Windows is that it is not just building `git.exe` and distributes that. Due to its heritage within the Linux project, Git takes certain things for granted, such as the presence of a Unix shell, or for that matter, a package management system from which dependencies can be fetched and updated independently of Git itself. Things that are distinctly not present in most Windows setups. To accommodate for that, Git for Windows originally relied on the MSys project, a minimal fork of Cygwin providing a Unix shell ("Bash"), a Perl interpreter and similar Unix-like tools, and on the MINGW project, a project to build libraries and executables using a GNU C Compiler that relies only on Win32 API functions. As of Git for Windows v2.x, the project has switched away from [MSys](https://sourceforge.net/projects/mingw/files/MSYS/)/[MinGW](https://osdn.net/projects/mingw/) (due to less-than-active maintenance) to [the MSYS2 project](https://msys2.org). That switch brought along the benefit of a robust package management system based on [Pacman](https://archlinux.org/pacman/) (hailing from Arch Linux). To support Windows users, who are in general unfamiliar with Linux-like package management and the need to update installed packages frequently, Git for Windows bundles a subset of its own fork of MSYS2. To put things in perspective: Git for Windows bundles files from ~170 packages, one of which contains Git, and another one contains Git's help files. In that respect, Git for Windows acts like a distribution more than like a mere single software application.
22+
23+
Most of MSYS2's packages that are bundled in Git for Windows are consumed directly from MSYS2. Others need forks that are maintained by Git for Windows project, to support Git for Windows better. These forks live in the [`git-for-windows/MSYS2-packages`](https://github.com/git-for-windows/MSYS2-packages) and [`git-for-windows/MINGW-packages`](https://github.com/git-for-windows/MINGW-packages) repositories. There are several reasons justifying these forks. For example, the Git for Windows' flavor of the MSYS2 runtime behaves like Git's test suite expects it while MSYS2's flavor does not. Another example: The Bash executable bundled in Git for Windows is code-signed with the same certificate as `git.exe` to help anti-malware programs get out of the users' way. That is why Git for Windows maintains its own `bash` Pacman package. And since MSYS2 dropped 32-bit support already, Git for Windows has to update the 32-bit Pacman packages itself, which is done in the git-for-windows/MSYS2-packages repository. (Side note: the 32-bit issue is a bit more complicated, actually: MSYS2 _still_ builds _MINGW_ packages targeting i686 processors, but no longer any _MSYS_ packages for said processor architecture, and Git for Windows does not keep all of the 32-bit MSYS packages up to date but instead judiciously decides which packages are vital enough as far as Git is concerned to justify the maintenance cost.)
24+
25+
### Supporting third-party applications that use Git's functionality
26+
27+
Since the infrastructure required by Git is non-trivial the installer (or for that matter, the Portable Git) is not exactly light-weight: As of January 2023, both artifacts are over fifty megabytes. This is a problem for third-party applications wishing to bundle a version of Git for Windows, which is often advisable given that applications may depend on features that have been introduced only in recent Git versions and therefore relying on an installed Git for Windows could break things. To help with that, the Git for Windows project also provides MinGit as a release artifact, a zip file that is much smaller than the full installer and that contains only the parts of Git for Windows relevant for third-party applications. It lacks Git GUI, for example, as well as the terminal program MinTTY, or for that matter, the documentation.
28+
29+
### Supporting `git/git`'s GitHub workflows
30+
31+
The Git for Windows project is also responsible for keeping the Windows part of `git/git`'s automated builds up and running. On Windows, there is no canonical and easy way to get a build environment necessary to build Git and run its test suite, therefore this is a non-trivial task that comes with its own maintenance cost. Git for Windows provides two GitHub Actions to help with that: [`git-for-windows/setup-git-for-windows-sdk`](https://github.com/git-for-windows/setup-git-for-windows-sdk) to set up a tiny subset of Git for Windows' full SDK (which would require about 500MB to be cloned, as opposed to the ~75MB of that subset) and [`git-for-windows/get-azure-pipelines-artifact`](https://github.com/git-for-windows/get-azure-pipelines-artifact) e.g. to download some regularly pre-built artifacts (for example, when `git/git`'s automated tests ran on an Ubuntu version that did not provide an up to date [Coccinelle](https://coccinelle.gitlabpages.inria.fr/website/) package, this GitHub Action was used to download a pre-built version of that Debian package).
32+
33+
## Maintaining Git for Windows' components
34+
35+
Git for Windows uses a combination of [a GitHub App called GitForWindowsHelper](https://github.com/git-for-windows/gfw-helper-github-app) (to listen for so-called [slash commands](https://github.com/git-for-windows/gfw-helper-github-app#slash-commands)) combined with workflows in [the `git-for-windows-automation` repository](https://github.com/git-for-windows/git-for-windows-automation/) (for computationally heavy tasks) to support Git for Windows' repetitive tasks.
36+
37+
This heavy automation serves two purposes:
38+
39+
1. Document the knowledge about "how things are done" in the Git for Windows project.
40+
2. Make Git for Windows' maintenance less tedious by off-loading as many tasks onto machines as possible.
41+
42+
One neat trick of some `git-for-windows-automation` workflows is that they "mirror back" check runs to the targeted PRs in another repository. This essentially allows versioning the source code independently of the workflow definition.
43+
44+
Here is a diagram showing how the bits and pieces fit together.
45+
46+
```mermaid
47+
graph LR
48+
A[`monitor-components`] --> |opens| B
49+
B{issues labeled<br />`component-update`} --> |/open pr| C
50+
C((GitForWindowsHelper)) --> |triggers| D
51+
D[`open-pr`] --> |opens| E
52+
E{PR in</br>MINGW-packages<br />MSYS2-packages<br />build-extra} --> |closes| B
53+
E --> |/deploy| F
54+
F((GitForWindowsHelper)) --> |triggers| G
55+
G[`build-and-deploy`] --> |deploys to| H
56+
H{Pacman repository}
57+
C --> |backed by| I
58+
F --> |backed by| I
59+
I[[Azure Function]]
60+
D --> |running in| J
61+
G --> | running in| J
62+
J[[git-for-windows-automation]]
63+
K[[git-sdk-32<br />git-sdk-64<br />git-sdk-arm64]] --> |syncing from| H
64+
B --> |/add release note| L
65+
L[`add-release-note`]
66+
```
67+
68+
For the curious mind, here are [detailed instructions how the Azure Function backing the GitForWindowsHelper GitHub App was set up](https://github.com/git-for-windows/gfw-helper-github-app#how-this-github-app-was-set-up).
69+
70+
### The `monitor-components` workflow
71+
72+
When new versions of components that Git for Windows builds become available, new Pacman packages have to be built. To this end, [the `monitor-components` workflow](https://github.com/git-for-windows/git/blob/main/.github/workflows/monitor-components.yml) monitors a couple of RSS feeds and opens new tickets labeled `component-update` for such new versions.
73+
74+
### Opening Pull Requests to update Git for Windows' components
75+
76+
After determining that such a ticket indeed indicates the need for a new Pacman package build, a Git for Windows maintainer issues the `/open pr` command via an issue comment ([example](https://github.com/git-for-windows/git/issues/4281#issuecomment-1426859787)), which gets picked up by the GitForWindowsHelper GitHub App, which in turn triggers [the `open-pr` workflow](https://github.com/git-for-windows/git-for-windows-automation/blob/main/.github/workflows/open-pr.yml) in the `git-for-windows-automation` repository.
77+
78+
### Deploying the Pacman packages
79+
80+
This will open a Pull Request in one of Git for Windows' repositories, and once the PR build passes, a Git for Windows maintainer issues the `/deploy` command ([example](https://github.com/git-for-windows/MINGW-packages/pull/69#issuecomment-1427591890)), which gets picked up by the GitForWindowsHelper GitHub App, which triggers [the `build-and-deploy` workflow](https://github.com/git-for-windows/git-for-windows-automation/blob/main/.github/workflows/build-and-deploy.yml).
81+
82+
### Adding release notes
83+
84+
Finally, once the packages have been built and deployed to the Pacman repository (which is hosted in Azure Blob Storage), a Git for Windows maintainer will merge the PR(s), which in turn will close the ticket, and the maintainer then issues an `/add release note` command ([example](https://github.com/git-for-windows/MINGW-packages/pull/69#issuecomment-1427782230)), which again gets picked up by the GitForWindowsHelper GitHub App that triggers [the `add-release-note` workflow](https://github.com/git-for-windows/build-extra/blob/main/.github/workflows/add-release-note.yml) that creates and pushes a new commit to the `ReleaseNotes.md` file in `build-extra` ([example](https://github.com/git-for-windows/build-extra/commit/b39c148ff8dc0e987afdb677d17c46a8e99fd0ef)).
85+
86+
## Releasing official Git for Windows versions
87+
88+
A relatively infrequent part of Git for Windows' maintainers' duties, if the most rewarding part, is the task of releasing new versions of Git for Windows.
89+
90+
Most commonly, this is done in response to the "upstream" Git project releasing a new version. When that happens, a Git for Windows maintainer runs [the helper script](https://github.com/git-for-windows/build-extra/blob/main/shears.sh) to perform a "merging rebase" (i.e. a rebase that starts with a fake-merge of the previous tip commit, to maintain both a clean set of commits as well as a [fast-forwarding](https://git-scm.com/docs/git-merge#Documentation/git-merge.txt---ff-only) commit history).
91+
92+
Once that is done, the maintainer will open a Pull Request to benefit from the automated builds and tests ([example](https://github.com/git-for-windows/git/pull/4160)) as well as from reviews of the [`range-diff`](https://git-scm.com/docs/git-range-diff) relative to the current `main` branch.
93+
94+
Once everything looks good, the maintainer will issue the `/git-artifacts` command ([example](https://github.com/git-for-windows/git/pull/4160#issuecomment-1346801735)). This will trigger an automated workflow that builds all of the release artifacts: installers, Portable Git, MinGit, `.tar.xz` archive and a NuGet package. Apart from the NuGet package, two sets of artifacts are built: targeting 32-bit ("x86") and 64-bit ("amd64").
95+
96+
Once these artifacts are built, the maintainer will download the installer and run [the "pre-flight checklist"](https://github.com/git-for-windows/build-extra/blob/main/installer/checklist.txt).
97+
98+
If everything looks good, a `/release` command will be issued, which triggers yet another workflow that will download the just-built-and-verified release artifacts, publish them as a new GitHub release, publish the NuGet packages, deploy the Pacman packages to the Pacman repository, send out an announcement mail, and update the respective repositories including [Git for Windows' website](https://gitforwindows.org/).
99+
100+
As mentioned [before](#architecture-of-git-for-windows), the `/git-artifacts` and `/release` commands are picked up by the GitForWindowsHelper GitHub App which subsequently triggers the respective workflows in the `git-for-windows-automation` repository. Here is a diagram:
101+
102+
```mermaid
103+
graph LR
104+
A{Pull Request<br />updating to<br />new Git version} --> |/git-artifacts| B
105+
B((GitForWindowsHelper)) --> |triggers| C
106+
C[`tag-git`] --> |upon successful build<br />triggers| D
107+
D((GitForWindowsHelper)) --> |triggers| E
108+
E[`git-artifacts`]
109+
E --> |maintainer verifies artifacts| E
110+
A --> |upon verified `git-artifacts`<br />/release| F
111+
F[`release-git`]
112+
C --> |running in| J
113+
E --> | running in| J
114+
F --> | running in| J
115+
J[[git-for-windows-automation]]
116+
```
117+
118+
## Managing Windows/ARM64 builds
119+
120+
The GitForWindowsHelper comes in real handy for Git for Windows' Pacman packages for the `aarch64` architecture, i.e. for Windows/ARM64. These packages cannot be built in regular hosted GitHub Actions runners because there are none of that architecture. To help with that, the respective workflows in `git-for-windows-automation` use the label `runs-on: ["Windows", "ARM64"]` to indicate that they need a self-hosted Windows/ARM64 runner.
121+
122+
It would not be cost-effective to have a VM running permanently, hosting such a self-hosted runner: Git for Windows does not build such packages often enough (usually once or twice per week is more the norm).
123+
124+
Therefore, VMs providing self-hosted GitHub Actions runners are spun up and torn down as needed. This job is done by the GitForWindowsHelper:
125+
126+
- When a job is queued asking for above-mentioned labels, [the `create-self-hosted-runner` workflow](https://github.com/git-for-windows/git-for-windows-automation/blob/09ec165f44a0a3d84d8f0e26a4939667b4522635/.github/workflows/create-azure-self-hosted-runners.yml) is started. This deploys an Azure Resource Management template that creates an ephemeral self-hosted runner (i.e. a runner that will pick up one job and then is immediately unregistered).
127+
128+
- When a job with above-mentioned labels has finished, the GitForWindowsHelper triggers [the `delete-self-hosted-runner` workflow](https://github.com/git-for-windows/git-for-windows-automation/blob/09ec165f44a0a3d84d8f0e26a4939667b4522635/.github/workflows/delete-self-hosted-runner.yml) that tears down the now no longer used VM.
129+
130+
The GitForWindowsHelper GitHub App will also detect when a job is queued for a PR from a forked repository. This is considered unauthorized use, and the job will be canceled immediately by the GitHub App instead of spinning up a self-hosted runner for it.

‎CODE_OF_CONDUCT.md

+26-32
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# Git Code of Conduct
1+
# Git for Windows Code of Conduct
22

33
This code of conduct outlines our expectations for participants within
4-
the Git community, as well as steps for reporting unacceptable behavior.
5-
We are committed to providing a welcoming and inspiring community for
6-
all and expect our code of conduct to be honored. Anyone who violates
4+
the **Git for Windows** community, as well as steps for reporting unacceptable
5+
behavior. We are committed to providing a welcoming and inspiring community
6+
for all and expect our code of conduct to be honored. Anyone who violates
77
this code of conduct may be banned from the community.
88

99
## Our Pledge
@@ -12,8 +12,8 @@ We as members, contributors, and leaders pledge to make participation in our
1212
community a harassment-free experience for everyone, regardless of age, body
1313
size, visible or invisible disability, ethnicity, sex characteristics, gender
1414
identity and expression, level of experience, education, socio-economic status,
15-
nationality, personal appearance, race, religion, or sexual identity
16-
and orientation.
15+
nationality, personal appearance, race, caste, color, religion, or sexual
16+
identity and orientation.
1717

1818
We pledge to act and interact in ways that contribute to an open, welcoming,
1919
diverse, inclusive, and healthy community.
@@ -28,17 +28,17 @@ community include:
2828
* Giving and gracefully accepting constructive feedback
2929
* Accepting responsibility and apologizing to those affected by our mistakes,
3030
and learning from the experience
31-
* Focusing on what is best not just for us as individuals, but for the
32-
overall community
31+
* Focusing on what is best not just for us as individuals, but for the overall
32+
community
3333

3434
Examples of unacceptable behavior include:
3535

36-
* The use of sexualized language or imagery, and sexual attention or
37-
advances of any kind
36+
* The use of sexualized language or imagery, and sexual attention or advances of
37+
any kind
3838
* Trolling, insulting or derogatory comments, and personal or political attacks
3939
* Public or private harassment
40-
* Publishing others' private information, such as a physical or email
41-
address, without their explicit permission
40+
* Publishing others' private information, such as a physical or email address,
41+
without their explicit permission
4242
* Other conduct which could reasonably be considered inappropriate in a
4343
professional setting
4444

@@ -58,20 +58,14 @@ decisions when appropriate.
5858

5959
This Code of Conduct applies within all community spaces, and also applies when
6060
an individual is officially representing the community in public spaces.
61-
Examples of representing our community include using an official e-mail address,
61+
Examples of representing our community include using an official email address,
6262
posting via an official social media account, or acting as an appointed
6363
representative at an online or offline event.
6464

6565
## Enforcement
6666

6767
Instances of abusive, harassing, or otherwise unacceptable behavior may be
68-
reported to the community leaders responsible for enforcement at
69-
git@sfconservancy.org, or individually:
70-
71-
- Ævar Arnfjörð Bjarmason <avarab@gmail.com>
72-
- Christian Couder <christian.couder@gmail.com>
73-
- Junio C Hamano <gitster@pobox.com>
74-
- Taylor Blau <me@ttaylorr.com>
68+
reported by contacting the Git for Windows maintainer.
7569

7670
All complaints will be reviewed and investigated promptly and fairly.
7771

@@ -94,15 +88,15 @@ behavior was inappropriate. A public apology may be requested.
9488

9589
### 2. Warning
9690

97-
**Community Impact**: A violation through a single incident or series
98-
of actions.
91+
**Community Impact**: A violation through a single incident or series of
92+
actions.
9993

10094
**Consequence**: A warning with consequences for continued behavior. No
10195
interaction with the people involved, including unsolicited interaction with
10296
those enforcing the Code of Conduct, for a specified period of time. This
10397
includes avoiding interactions in community spaces as well as external channels
104-
like social media. Violating these terms may lead to a temporary or
105-
permanent ban.
98+
like social media. Violating these terms may lead to a temporary or permanent
99+
ban.
106100

107101
### 3. Temporary Ban
108102

@@ -118,27 +112,27 @@ Violating these terms may lead to a permanent ban.
118112
### 4. Permanent Ban
119113

120114
**Community Impact**: Demonstrating a pattern of violation of community
121-
standards, including sustained inappropriate behavior, harassment of an
115+
standards, including sustained inappropriate behavior, harassment of an
122116
individual, or aggression toward or disparagement of classes of individuals.
123117

124-
**Consequence**: A permanent ban from any sort of public interaction within
125-
the community.
118+
**Consequence**: A permanent ban from any sort of public interaction within the
119+
community.
126120

127121
## Attribution
128122

129123
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
130-
version 2.0, available at
131-
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
124+
version 2.1, available at
125+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
132126

133127
Community Impact Guidelines were inspired by
134128
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
135129

136130
For answers to common questions about this code of conduct, see the FAQ at
137-
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
138-
at [https://www.contributor-covenant.org/translations][translations].
131+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
132+
[https://www.contributor-covenant.org/translations][translations].
139133

140134
[homepage]: https://www.contributor-covenant.org
141-
[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
135+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
142136
[Mozilla CoC]: https://github.com/mozilla/diversity
143137
[FAQ]: https://www.contributor-covenant.org/faq
144138
[translations]: https://www.contributor-covenant.org/translations

‎CONTRIBUTING.md

+417
Large diffs are not rendered by default.

‎README.md

+76-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,77 @@
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+
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md)
5+
[![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)
6+
[![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)
7+
[![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)
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 in Git
16+
for Windows' [Discussions](https://github.com/git-for-windows/git/discussions)
17+
or on the [Git mailing list](mailto:git@vger.kernel.org), and [contribute bug
18+
fixes](https://gitforwindows.org/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).
275
376
Git - fast, scalable, distributed revision control system
477
=========================================================
@@ -29,7 +102,7 @@ CVS users may also want to read [Documentation/gitcvs-migration.adoc][]
29102
(`man gitcvs-migration` or `git help cvs-migration` if git is
30103
installed).
31104
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
33106
mailing list -- everyone is welcome to post bug reports, feature
34107
requests, comments and patches to git@vger.kernel.org (read
35108
[Documentation/SubmittingPatches][] for instructions on patch submission
@@ -43,6 +116,7 @@ To subscribe to the list, send an email to <git+subscribe@vger.kernel.org>
43116
(see https://subspace.kernel.org/subscribing.html for details). The mailing
44117
list archives are available at <https://lore.kernel.org/git/>,
45118
<https://marc.info/?l=git> and other archival sites.
119+
The core git mailing list is plain text (no HTML!).
46120
47121
Issues which are security relevant should be disclosed privately to
48122
the Git Security mailing list <git-security@googlegroups.com>.

‎SECURITY.md

+35-21
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,38 @@ Examples for details to include:
2828

2929
## Supported Versions
3030

31-
There are no official "Long Term Support" versions in Git.
32-
Instead, the maintenance track (i.e. the versions based on the
33-
most recently published feature release, also known as ".0"
34-
version) sees occasional updates with bug fixes.
35-
36-
Fixes to vulnerabilities are made for the maintenance track for
37-
the latest feature release and merged up to the in-development
38-
branches. The Git project makes no formal guarantee for any
39-
older maintenance tracks to receive updates. In practice,
40-
though, critical vulnerability fixes are applied not only to the
41-
most recent track, but to at least a couple more maintenance
42-
tracks.
43-
44-
This is typically done by making the fix on the oldest and still
45-
relevant maintenance track, and merging it upwards to newer and
46-
newer maintenance tracks.
47-
48-
For example, v2.24.1 was released to address a couple of
49-
[CVEs](https://cve.mitre.org/), and at the same time v2.14.6,
50-
v2.15.4, v2.16.6, v2.17.3, v2.18.2, v2.19.3, v2.20.2, v2.21.1,
51-
v2.22.2 and v2.23.1 were released.
31+
Git for Windows is a "friendly fork" of [Git](https://git-scm.com/), i.e. changes in Git for Windows are frequently contributed back, and Git for Windows' release cycle closely following Git's.
32+
33+
While Git maintains several release trains (when v2.19.1 was released, there were updates to v2.14.x-v2.18.x, too, for example), Git for Windows follows only the latest Git release. For example, there is no Git for Windows release corresponding to Git v2.16.5 (which was released after v2.19.0).
34+
35+
One exception is [MinGit for Windows](https://gitforwindows.org/mingit) (a minimal subset of Git for Windows, intended for bundling with third-party applications that do not need any interactive commands nor support for `git svn`): critical security fixes are backported to the v2.11.x, v2.14.x, v2.19.x, v2.21.x and v2.23.x release trains.
36+
37+
## Version number scheme
38+
39+
The Git for Windows versions reflect the Git version on which they are based. For example, Git for Windows v2.21.0 is based on Git v2.21.0.
40+
41+
As Git for Windows bundles more than just Git (such as Bash, OpenSSL, OpenSSH, GNU Privacy Guard), sometimes there are interim releases without corresponding Git releases. In these cases, Git for Windows appends a number in parentheses, starting with the number 2, then 3, etc. For example, both Git for Windows v2.17.1 and v2.17.1(2) were based on Git v2.17.1, but the latter included updates for Git Credential Manager and Git LFS, fixing critical regressions.
42+
43+
## Tag naming scheme
44+
45+
Every Git for Windows version is tagged using a name that starts with the Git version on which it is based, with the suffix `.windows.<patchlevel>` appended. For example, Git for Windows v2.17.1' source code is tagged as [`v2.17.1.windows.1`](https://github.com/git-for-windows/git/releases/tag/v2.17.1.windows.1) (the patch level is always at least 1, given that Git for Windows always has patches on top of Git). Likewise, Git for Windows v2.17.1(2)' source code is tagged as [`v2.17.1.windows.2`](https://github.com/git-for-windows/git/releases/tag/v2.17.1.windows.2).
46+
47+
## Release Candidate (rc) versions
48+
49+
As a friendly fork of Git (the "upstream" project), Git for Windows is closely corelated to that project.
50+
51+
Consequently, Git for Windows publishes versions based on Git's release candidates (for upcoming "`.0`" versions, see [Git's release schedule](https://tinyurl.com/gitCal)). These versions end in `-rc<n>`, starting with `-rc0` for a very early preview of what is to come, and as with regular versions, Git for Windows tries to follow Git's releases as quickly as possible.
52+
53+
Note: there is currently a bug in the "Check daily for updates" code, where it mistakes the final version as a downgrade from release candidates. Example: if you installed Git for Windows v2.23.0-rc3 and enabled the auto-updater, it would ask you whether you want to "downgrade" to v2.23.0 when that version was available.
54+
55+
[All releases](https://github.com/git-for-windows/git/releases/), including release candidates, are listed via a link at the footer of the [Git for Windows](https://gitforwindows.org/) home page.
56+
57+
## Snapshot versions ('nightly builds')
58+
59+
Git for Windows also provides snapshots (these are not releases) of the current development as per git-for-Windows/git's `master` branch at the [Snapshots](https://gitforwindows.org/git-snapshots/) page. This link is also listed in the footer of the [Git for Windows](https://gitforwindows.org/) home page.
60+
61+
Note: even if those builds are not exactly "nightly", they are sometimes referred to as "nightly builds" to keep with other projects' nomenclature.
62+
63+
## Following upstream's developments
64+
65+
The [gitforwindows/git repository](https://github.com/git-for-windows/git) also provides the `shears/*` branches. The `shears/*` branches reflect Git for Windows' patches, rebased onto the upstream integration branches, [updated (mostly) via automated CI builds](https://dev.azure.com/git-for-windows/git/_build?definitionId=25).

0 commit comments

Comments
 (0)
Please sign in to comment.