0

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

i.e. git update or git update@2.7.2

Or is there any other programmer-way of installation.

Zeeshan Hassan Memon
  • 8,105
  • 4
  • 43
  • 57

1 Answers1

1

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.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250