Zeeshan Hassan Memon
Zeeshan Hassan Memon

Reputation: 8325

update git with cli | programmer way of installation

Is it possible to update git with latest version available with command?

i.e. git update or git [email protected]

Or is there any other programmer-way of installation.

Upvotes: 0

Views: 55

Answers (1)

VonC
VonC

Reputation: 1327334

On Windows, you can curl the latest Portable edition of git for windows (listed in https://github.com/git-for-windows/git/releases/latest, a unique url which always reference the latest release).
See for example "Is there a link to GitHub for downloading a file in the latest release of a repository?"

  • Unzip it in c:\prgs\git\PortableGit-2.x.y-64-bit (using the name of the portable edition you just downloaded).
  • Make a symbolic link latest pointing to it

    rmdir latest
    mklink /J latest PortableGit-2.x.y-64-bit
    

(it actually is a junction, which does not require elevated privilege)

That way, you path can reference c:\prgs\git\latest\bin: each time you change that latest link, you update your git.
And since it is a portable edition, there is no setup involved.

Upvotes: 1

Related Questions