How to upgrade Git in Babun
Asked Answered
E

6

14

I have just installed:

https://github.com/babun/babun

in windows 8 but how do I upgrade Git to latest version?

It comes with

{ ~ } » git --version ~ git version 1.7.9

I did try:

 pact install git-2.0.4.tar

Where git-2.0.4.tar is located in the current directory. I also tried to copy it too /setup but I still get this error:

{ ~ }  »  pact install git-2.0.4.tar
Working directory is /setup
Mirror is http://mirrors.kernel.org/sourceware/cygwin/
setup.ini taken from the cache

Installing git-2.0.4.tar
Package git-2.0.4.tar not found or ambiguous name, exiting
Echidna answered 13/8, 2014 at 7:14 Comment(1)
If you expect someone to help you, you should precisely describe your actual problem. What steps did you try, what kind of problems did you encounter, ...?Higgler
V
19

pact update git

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

Vibes answered 28/9, 2015 at 4:45 Comment(0)
M
21

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.

Meseems answered 28/8, 2014 at 11:28 Comment(7)
Reinstalling was sufficient for me.Hyaloid
Reinstalling will not work as on 18.02.2015. Please refer to github.com/babun/babun/issues/232 Steps provided in 'OR' worked for me. @Juha maybe you should updated your answer accordingly.Organogenesis
I made the same mistake than Mr. L, maybe you should eddit your answer to warm about it.Avenue
The linked issue was marked as closed and resolved in March of 2015, so the simple reinstallation should be sufficient now.Olivia
I attempted to build git but I'm getting 'tclsh missing'. 2.8.3 vs 2.12 right now and I'm noticing some differences with advanced commands leading me back to mingw/git bash.Denten
For anyone doubting whether the x86 version is the correct one to use with an x64 OS, yes - Babun uses the x86 version by default so install that when upgrading.Fula
PS, this worked great (so far.) I strongly advise having a system backup in place before trying this though because you may discover that something has broken down the line.Fula
V
19

pact update git

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

Vibes answered 28/9, 2015 at 4:45 Comment(0)
P
3

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..

Poesy answered 17/1, 2018 at 12:40 Comment(2)
This may be the best solution. It seems that the Babun team royally hosed the update process for (at least) git. I mean, come on...the current git version is 2.17.0 and currently ships with 2.1.something.Lithomarge
I second this - Pact update git does not work on latest babun. 1.2.0Rocambole
V
2

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
Vesicant answered 28/6, 2019 at 14:15 Comment(1)
For me babun's update.bat was necessary, but not sufficient. I also needed pact invalidate && pact update git (and some patience) to get git running againCodie
S
0

After git update:

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]

Seems it's back to CygWin ... but first I'll give Windows Subsystem for Linux a try

wslgit.bat: (on x64 arch)

@echo off
setlocal enabledelayedexpansion
set command=%*
bash.exe -c 'git %command%'
Scalise answered 13/3, 2019 at 8:6 Comment(1)
Ubuntu 18.04 on WSL seems to work okay ... a little tricky to use WSL's git in a Windows installed IntelliJ, but it is do-able :-)Scalise
A
0

Many things happens by accident. This is one of them.

I enjoy using Babun but now when Babun is discontinued I knew the git version was going to become a problem (was v2.1.4).

My work computer is not connected to internet so I usually have to download complete install files and run them after transferring. No internet dependency possible.

I have Git-Bash installed but I prefer Babun terminal when I can.

Inside Babun I ran pact update git but I knew of course this would not work since I am not connected to internet.

This happened when I ran pact update git

  1. pact removed git
  2. pact complained that mirrors not was available (no surprise there)
  3. pact gave up

Then I thought that was it for Babun now that Git was gone.

I typed git version and there it was git version 2.21.0.windows.1

Maybe not the greatest solution for everybody but it works when you have Git-Bash installed already and no internet connection.

Albertoalberts answered 9/5, 2019 at 12:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.