The `windows-latest` runner image migration that began on June 8, 2026
and completes on June 15, 2026 switches the default Visual Studio
install from VS 2022 (v17) to VS 2026 (v18), per
https://github.com/actions/runner-images/issues/14017.
CMake 4.x picks up the new generator name "Visual Studio 18 2026"
automatically and, crucially, writes the solution file with the new
`.slnx` (XML) extension rather than `.sln`. See
https://github.com/Kitware/CMake/blob/v4.3.2/Source/cmGlobalVisualStudioGenerator.cxx#L1147-L1159
where `GetSLNFile()` appends an "x" to the filename when the generator
version is `VS18` or newer.
As a result, the `MSBuild` step in the `vs-build` job fails with
MSBUILD : error MSB1009: Project file does not exist.
Switch: git.sln
because the file CMake actually wrote is `git.slnx`. An example of the
failure can be seen at
https://github.com/git-for-windows/git/actions/runs/27264770241/job/80556419519.
Teach the step to prefer `git.slnx` and fall back to `git.sln` so that
it works on both the new image and any runner still on VS 2022 during
the week-long staggered rollout. The conditional is written in
PowerShell rather than bash so the step stays on the default shell:
`microsoft/setup-msbuild@v3` adds `msbuild` to the Windows `PATH` only,
and an MSYS2 bash spawned by the SDK does not pick it up (an earlier
attempt at this fix using `shell: bash` failed with
`msbuild: command not found`, see
https://github.com/git-for-windows/git/actions/runs/27290221733/job/80608493655).
Letting MSBuild itself discover the solution by omitting the project
argument is not an option here either: CMake emits all `*.vcxproj`
files (one per `add_executable`/`add_library`, e.g.
`git-daemon.vcxproj`, `common-main.vcxproj`, `ALL_BUILD.vcxproj`, ...)
into the same build root as the solution file, and MSBuild's
auto-discovery in
`ProcessProjectSwitch()` (`dotnet/msbuild`, `src/MSBuild/XMake.cs`)
rejects that combination as `AmbiguousProjectError` because it only
disambiguates the special case of exactly two projects where one has a
`.proj` extension.
Additionally, drop the `-property:PlatformToolset=v142` argument that
had been carried since 889cacb6 (ci: configure GitHub Actions for
CI/PR, 2020-04-11), when this job was first configured for VS 2019.
The VS 2026 install on `windows-latest` only ships the v144 toolset
along with a v143 compatibility component
(`Microsoft.VisualStudio.Component.VC.14.44.17.14.x86.x64`); v142 is
no longer present, so the explicit pin would now also fail in its own
right. Removing it lets MSBuild use whatever toolset CMake selected
during configuration (v143 on a VS 2022 runner, v144 on a VS 2026 one),
which keeps the configure and build steps consistent with each other
regardless of which image picked up the job.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Assisted-by: Opus 4.7
Git for Windows
This is Git for Windows, the Windows port of Git.
The Git for Windows project is run using a governance model. If you encounter problems, you can report them as GitHub issues, discuss them in Git for Windows' Discussions or on the Git mailing list, and contribute bug fixes.
To build Git for Windows, please either install Git for Windows'
SDK, start its git-bash.exe, cd
to your Git worktree and run make, or open the Git worktree as a folder in
Visual Studio.
To verify that your build works, use one of the following methods:
-
If you want to test the built executables within Git for Windows' SDK, prepend
<worktree>/bin-wrappersto thePATH. -
Alternatively, run
make installin the Git worktree. -
If you need to test this in a full installer, run
sdk build git-and-installer. -
You can also "install" Git into an existing portable Git via
make install DESTDIR=<dir>where<dir>refers to the top-level directory of the portable Git. In this instance, you will want to prepend that portable Git's/cmddirectory to thePATH, or test by running that portable Git'sgit-bash.exeorgit-cmd.exe. -
If you built using a recent Visual Studio, you can use the menu item
Build>Install git(you will want to click onProject>CMake Settings for Gitfirst, then click onEdit JSONand then pointinstallRootto themingw64directory of an already-unpacked portable Git).As in the previous bullet point, you will then prepend
/cmdto thePATHor run using the portable Git'sgit-bash.exeorgit-cmd.exe. -
If you want to run the built executables in-place, but in a CMD instead of inside a Bash, you can run a snippet like this in the
git-bash.exewindow where Git was built (ensure that theEOFline has no leading spaces), and then paste into the CMD window what was put in the clipboard:clip.exe <<EOF set GIT_EXEC_PATH=$(cygpath -aw .) set PATH=$(cygpath -awp ".:contrib/scalar:/mingw64/bin:/usr/bin:$PATH") set GIT_TEMPLATE_DIR=$(cygpath -aw templates/blt) set GITPERLLIB=$(cygpath -aw perl/build/lib) EOF -
If you want to run the built executables in-place, but outside of Git for Windows' SDK, and without an option to set/override any environment variables (e.g. in Visual Studio's debugger), you can call the Git executable by its absolute path and use the
--exec-pathoption, like so:C:\git-sdk-64\usr\src\git\git.exe --exec-path=C:\git-sdk-64\usr\src\git helpNote: for this to work, you have to hard-link (or copy) the
.dllfiles from the/mingw64/bindirectory to the Git worktree, or add the/mingw64/bindirectory to thePATHsomehow or other.
To make sure that you are testing the correct binary, call ./git.exe version
in the Git worktree, and then call git version in a directory/window where
you want to test Git, and verify that they refer to the same version (you may
even want to pass the command-line option --build-options to look at the
exact commit from which the Git version was built).
Git - fast, scalable, distributed revision control system
Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals.
Git is an Open Source project covered by the GNU General Public License version 2 (some parts of it are under different licenses, compatible with the GPLv2). It was originally written by Linus Torvalds with help of a group of hackers around the net.
Please read the file INSTALL for installation instructions.
Many Git online resources are accessible from https://git-scm.com/ including full documentation and Git related tools.
See Documentation/gittutorial.adoc to get started, then see
Documentation/giteveryday.adoc for a useful minimum set of commands, and
Documentation/git-<commandname>.adoc for documentation of each command.
If git has been correctly installed, then the tutorial can also be
read with man gittutorial or git help tutorial, and the
documentation of each command with man git-<commandname> or git help <commandname>.
CVS users may also want to read Documentation/gitcvs-migration.adoc
(man gitcvs-migration or git help cvs-migration if git is
installed).
The user discussion and development of core Git take place on the Git mailing list -- everyone is welcome to post bug reports, feature requests, comments and patches to git@vger.kernel.org (read Documentation/SubmittingPatches for instructions on patch submission and Documentation/CodingGuidelines).
Those wishing to help with error message, usage and informational message
string translations (localization l10) should see po/README.md
(a po file is a Portable Object file that holds the translations).
To subscribe to the list, send an email to git+subscribe@vger.kernel.org (see https://subspace.kernel.org/subscribing.html for details). The mailing list archives are available at https://lore.kernel.org/git/, https://marc.info/?l=git and other archival sites. The core git mailing list is plain text (no HTML!).
Issues which are security relevant should be disclosed privately to the Git Security mailing list git-security@googlegroups.com.
The maintainer frequently sends the "What's cooking" reports that list the current status of various development topics to the mailing list. The discussion following them give a good reference for project status, development direction and remaining tasks.
The name "git" was given by Linus Torvalds when he wrote the very first version. He described the tool as "the stupid content tracker" and the name as (depending on your mood):
- random three-letter combination that is pronounceable, and not actually used by any common UNIX command. The fact that it is a mispronunciation of "get" may or may not be relevant.
- stupid. contemptible and despicable. simple. Take your pick from the dictionary of slang.
- "global information tracker": you're in a good mood, and it actually works for you. Angels sing, and a light suddenly fills the room.
- "goddamn idiotic truckload of sh*t": when it breaks