2

On Git Bash's download site, it says you can clone it to update it. I downloaded it to install it, but I am starting to really get into Git and would like to clone it every time I want to update it from now on. I think I found the place where we need to clone it to, after much searching & less documentation than usual. If I am right, it is in the home directory, right under my nose the whole time!

I checked the version number with git --version beforehand, then cloned in that directory, then rechecked the version number Both times it said git version 1.8.3.msysgit.0, but on the download site it says the latest version is 1.8.4.3.

Have I not found the elusive git folder, or does the Git Bash team not let you directly clone the latest version until some time after it comes out? I know VirtualBox does that, for example.

I know this is sort of a duplicate of this question, but I tried its answer & the PATH variable didn't even have Git!

Community
  • 1
  • 1
trysis
  • 8,086
  • 17
  • 51
  • 80
  • Are you running git from the cloned directory? Doesn't look that way. Looks like you're running it with some other way, which looks for git in `%PATH%` and finds your old installation. – janos Nov 23 '13 at 07:16
  • I initially downloaded it, I didn't clone it. I am trying to clone it to update it from now on. Sorry if I wasn't clear on that, I will update my question. I'm not too familiar with certain Windows internals, but if the answer I referenced was talking about %PATH%, it doesn't have Git in it on mine. – trysis Nov 23 '13 at 07:31

1 Answers1

1

I would recommend to not try to update it, but simply download the portable version of msysgit and unzip it in a dedicated folder, that you then add to your path:

Current Portable msysgit download.

=> I unzip the latest one in (for instance) C:\prgs\git\PortableGit-1.8.4-preview20130916.

=> I add 'c:\prgs\git\PortableGit-1.8.4-preview20130916\bin' to my PATH.


Now if you want to automate that download/update process, I am building a Powershell script which does just that (for git and 30 other programs, including Mercurial, Subversion, but also Python, Ruby, Go, ...):

senv: download the zip archive of senv, unzip it in a path and call:

senv

The first time, you specify where you want all those programs to be downloaded: those are portable software only: no registry modification, no system variables modified.
If you don't want one of those program anymore, simply delete their installation folder.
That's it.

But each time you will call senv -u, it will check their respective web page and, if a new version is detected, it will download/upzip said new version in its dedicated folder, without removing the previous one.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • If I may ask, why do you recommend this? What is wrong with cloning it? Again, I'm just wondering. – trysis Nov 24 '13 at 03:00
  • I definitely love all these new "portable" programs - if you don't want it anymore, just delete it. No uninstallation cr*p, no lingering files after, no muss, no fuss. Beautiful. – trysis Nov 24 '13 at 03:21
  • 1
    @trysis it allows for a separate installation, from version to version. If the newer version has some bug, it is easy to fallback to the previous installed version. – VonC Nov 24 '13 at 08:48
  • It would be better if they had a different branch for each version. Isn't that what Git is for? Ah well, thanks for the advice. Also, thanks for the Powershell script. Any timeframe on when you'll finish it? – trysis Nov 24 '13 at 21:03
  • 1
    @trysis I was talking about installing different version of git in different folder. Thant doesn't mean the repository managed by Git can't have multiple branches. But a repository is quite different from a software. It is best to have several version of the software in separate folders, to chose the latest or the right one. But the repos you manage with it can have as many branches they need. – VonC Nov 24 '13 at 21:06
  • 1
    @trysis the powershell script is currently working but can certainly be improved. Issues and Pull requests are welcome. – VonC Nov 24 '13 at 21:07
  • OK, maybe I'll look into it if I get a chance (& am smart enough to contribute anything). – trysis Nov 24 '13 at 21:22