How to upgrade Git in Babun

I had problems with git after the update:

WARNING: Git push strategy set to which is unsupported - changing to 'matching' ERROR: Cannot set git push.default to 'matching' - may cause problems... Could not start plugin [git]

But after uninstalling it with the following command, it worked again.

pact remove git

I think now babun uses the windows installation of git..


Update your installation by using Cygwin installer:

  1. Download Cygwin installer from http://cygwin.com/setup-x86.exe
  2. Run the installer and use your .babun\cygwin directory (most likely C:\Users\your-username\.babun\cygwin) as the root install directory
  3. Click through the installer. By default, it upgrades all packages.

Reinstalling git might also work:

pact remove git
pact install git

Reinstallation is quicker, but the full Cygwin upgrade is safer because all the dependencies are also upgraded automatically.


Attempting to update just the git installation using pact update git appears to work (at time of writing) - appropriate mirrors are found and the package is downloaded and installed successfully.

However, as @torben-vesterager pointed out on 13th March 2019, this version of git might cause errors. I saw the same error as he did:

WARNING: Git push strategy set to  which is unsupported - changing to 'matching'
ERROR: Cannot set git push.default to 'matching' - may cause problems...
Error on or near line 16, last command 'trap 'catch_err "${previous_command}" ${LINENO}' ERR';
Error on or near line 4, last command 'source "$babun_tools/git.sh"';
Could not start plugin [git]

Further investigation showed that this was actually because the git binary was not compatible with the installed version of Cygwin itself - running git.exe in a Windows context gave an appropriate warning about a incorrectly linked DLL (apologies for not capturing the exact message).

To resolve this properly, close all your Babun windows and run update.bat from the Babun home directory. This will update Cygwin to the latest release (which babun update does not do), including a newer version of git.

» uname -a
CYGWIN_NT-10.0-WOW a5044 3.0.7(0.338/5/3) 2019-04-30 18:04 i686 Cygwin
» git version
git version 2.21.0

pact update git

Updated to the latest version of Git, 2.5.3, just now.

Tags:

Windows

Git

Babun