Skip to content

Commit 90f9837

Browse files
committed
Mention steps to fix DLL issues; merge all notes into one section as the topics overlap a lot
1 parent f713029 commit 90f9837

1 file changed

Lines changed: 6 additions & 10 deletions

File tree

Install-inside-MSYS2-proper.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ Git for Windows being based on MSYS2, it's possible to install the `mingw-w64-gi
44

55
This guide assumes you are comfortable using the command line and you are willing to completely re-install your MSYS2 if something goes wrong. You can contact @Elieux for advice in the `git-for-windows/git` Gitter room or through the contact channels for MSYS2. Please don't file issues with Git for Windows installed this way until you verify them in an official Git for Windows distribution.
66

7-
**Warning: an openssl package-collision breaks https-remotes. So if you have repositories that pull from https: this method is -- as-of-now -- not suited for you. There is no ETA for a fix, if you would like to contribute and have experience with pacman packages & openssl, please come to our gitter channel.**
8-
97

108
#### The steps
119

@@ -57,24 +55,22 @@ Here are the steps to install the 64-bit version of Git for Windows to be run in
5755

5856
Now you can close the current shell and open a MINGW64 shell (`msys2_shell.cmd -mingw64`) to check that everything went well. Run `git --version` and it should output something like `git version 2.31.0.windows.1` (or newer).
5957

58+
59+
#### Enhancements, modifications, troubleshooting
60+
6061
If you want to run Git from outside the shells, add `C:\msys64\cmd` to your `PATH`, e.g. by using *Edit environment variables for your account* from the Start menu. It has to come before any other entry pointing inside your MSYS2 installation. If you have installed your MSYS2 into a different directory, correct the path accordingly.
6162

62-
To integrate with the Windows Credential Manager, install the package `git-credential-manager`.
63+
To integrate with the Windows Credential Manager, install the package `mingw-w64-x86_64-git-credential-manager`.
6364

6465
To be able to view the git man pages when invoking help with `git help X` or `git X --help` (in addition to `man git-X`), add the line `export MSYS2_ENV_CONV_EXCL=MANPATH` to your shell configuration, and set the man pages as default help format with `git config --global help.format man` (or append `-m` to the git help invocation).
6566

66-
#### Troubleshooting
67-
6867
If you encounter error "*error: wrong number of arguments, should be from 1 to 2*" with `git add -p`, set `add.interactive.useBuiltin` to `true` in Git's configuration.
6968

70-
71-
#### Notes
69+
If you encounter DLL errors (*The code execution cannot proceed because libsomething.dll was not found.*), this is most likely an incompatibility between the DLL versions from Git for Windows and upstream MSYS2. Usually this is caused by cURL, GnuTLS and OpenSSL. Replacing the packages with the ones from upstream seems to work best, but no guarantees for what that actually does with Git: `pacman -S mingw64/mingw-w64-x86_64-curl mingw-w64-x86_64-gnutls mingw64/mingw-w64-x86_64-openssl`
7270

7371
Git for Windows carries an `msys2-runtime` different from upstream MSYS2, see [issue #284](https://github.com/git-for-windows/git/issues/284) for more details. You can run into some rare issues with programs other than Git due to this. It's possible to keep the stock MSYS2 runtime by moving the `msys` repository above the `git-for-windows` repository in `/etc/pacman.conf`. There are known issues with Git in that case, although not common.
7472

75-
Git for Windows also patches some other packages like cURL and OpenSSL. It unfortunately sometimes causes some packages to be behind in terms of their version, but keeping the upstream packages would most probably lead to a severely broken Git.
76-
77-
The `mingw-w64-git-extra` package modifies the MSYS2 environment heavily (sometimes in ways that are tedious to undo). The package can be skipped if you want to keep your MSYS2 pristine. As of this writing, the package:
73+
The `mingw-w64-x86_64-git-extra` package modifies the MSYS2 installation heavily (sometimes in ways that are tedious to undo). The package can be skipped if you want to keep your MSYS2 pristine. As of this writing, the package:
7874

7975
- brings the `git-for-windows-keyring` package as its dependency, but you can install it manually
8076
- adds the `sdk` command intended for developing Git for Windows

0 commit comments

Comments
 (0)