Git/Windows

From Omnia
< Git
Revision as of 03:20, 6 July 2025 by Kenneth (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Install

Chocolatey

choco uninstall git git.install git-lfs.install
choco install -y --upgrade --force --params "ALLUSERS=1"  git.install git-lfs.install
move "C:\Program Files\Git\mingw64\bin\git-lfs.exe" "C:\Program Files\Git\mingw64\bin\git-lfs.exe.old"
copy "C:\Program Files\Git LFS\git-lfs.exe" "C:\Program Files\Git\mingw64\bin\git-lfs.exe"

As of 2025.07.05:

C:\> git --version
git version 2.50.0.windows.2

C:\> git lfs --version
git-lfs/3.7.0 (GitHub; windows amd64; go 1.24.4; git 92dddf56)

Issues

2.50.0.windows.1 - git clone hangs intermittently on large repos

Worked in 2.49 and earlier. Failing in "2.50.0.windows.1"

$ git clone git@github.com:openjdk/jdk.git
Cloning into 'jdk'...
remote: Enumerating objects: 1582524, done.
remote: Counting objects: 100% (1275/1275), done.
remote: Compressing objects: 100% (585/585), done.
Receiving objects:   0% (1/1582524)

Temporary Workaround:

  • tracked down a workaround that works with git 2.50.0.0 in the Git Issue thread:
git config --global core.sshCommand "C:/Windows/System32/OpenSSH/ssh.exe" 

ref: https://github.com/git-for-windows/git/issues/5688#issuecomment-3009922246

ref: https://github.com/git-for-windows/git/issues/5682

Solution: