How to upgrade Git on Windows to the latest version?

前端 未结 14 1681
面向向阳花
面向向阳花 2020-12-02 03:37

I just upgraded to Git 1.8.0.1 for Windows, from my previous version 1.7.9.mysysgit.0. I downloaded the new version from the Git site and installed through the normal Git in

14条回答
  •  醉梦人生
    2020-12-02 04:01

    Since Git 2.16.1(2) you can use

    C:\> git update-git-for-windows
    

    In version between 2.14.2 and 2.16.1, the command was

    C:\> git update
    

    (It was later renamed to avoid confusion with updating the local repository, e.g. like svn update does it.)

    That command does not exist in Git 2.13 and before.

    If this errors with "is not a git command" then either you don't actually have Git for Windows, or your version is very old.

    In which case, simply get the latest installer from https://git-scm.com/download (check whether you want 32- or 64-bit) and run it to upgrade.

    If you already have the latest version it does nothing, in which case you can manually run the installer to reinstall.

    C:\> git update-git-for-windows
    Git for Windows 2.17.0.windows.1 (64bit)
    Up to date
    

提交回复
热议问题