如何从 Windows 上的 GitHub 桌面更新 git 版本
How to update git version from GitHub Desktop on Windows
我想使用 git 2.5
中引入的新 worktree
功能。但是,我不知道如何更新到最新版本的 GitHub 桌面( 而不是 git 本身)。
我安装 GitHub for desktop 并希望它附带最新版本,但是 git --version
returns git version 1.9.5.github.0
。但如果我没理解错的话,我们已经是第 2 版了。6.x!那么如何在我的 Windows 机器上更新到这个版本,我安装的 git 的唯一版本是 GH Desktop?
您可以在此处找到 Windows Git 安装程序:http://www.git-scm.com/
为了获得最佳效果,我建议卸载 Github 桌面,安装 Git(您从上面 link 下载的),然后重新安装 Github 客户端.
2015 年 11 月 25 日更新。
对于它的价值,GitHub Desktop(终于)使用更新的 git 版本:2.5。参见 Brendan Foster tweet。
原始答案(2015 年 11 月上旬)
首先,windows release is available here on GitHub 的最新 git。
我总是使用存档便携形式(在我想要的任何地方解压缩,并添加到 PATH
)。
但是,如果您选择了 exe
安装程序,则意味着它已安装在 C:\Program Files\Git
中。
但是,as I mentioned here、git也包含在GitHub Desktop自己的安装路径中(%USERPROFILE%\AppData\Local\GitHub\PORTAB~1\bin
)
理论上,您可以将文件夹 PORTAB~1 的确切值替换为目录 JUNCTION:
cd %USERPROFILE%\AppData\Local\GitHub
dir # take note of the exact name of PORTABLEGIT folder: <PORTAB...>
move <PORTAB...> old_PORTABLEGIT
mklink /J <PORTAB...> "C:\Program Files\Git"
在我最新的 GitHub Desktop 3.0.7.1 3397ae4 中,我看到:
C:\Users\vonc\AppData\Local\GitHub\PortableGit_c2ba306e536fdf878271f7fe636a147ff37326ad\bin
然而,那是行不通的:再次启动 GitHub Desktop 时,它会检测到更改并恢复其自己的嵌入式 Git 版本 (1.9.5)
因此您不能轻易地强制 GitHub Desktop 使用另一个 git 版本。
即使您能够以某种方式强制 GitHub for Desktop 使用另一个版本的 Git,您也必须仔细报告其内部 git 系统配置:
C:\Users\vonc\AppData\Local\GitHub\PortableGit_c2b...\etc\gitconfig
此文件指向 GitHub 桌面特定设置:
[http]
sslcainfo = /bin/curl-ca-bundle-ghfw.crt
[credential]
helper = !github --credentials
[filter "ghcleansmudge"]
clean = cat
smudge = cat
这些设置不存在于Git的非GitHub嵌入式版本中,需要恢复。
此处列出了描述 steps required to update github for windows 的说明:
在WindowsGithub的右上角,点击那个小齿轮的图标或者齿轮(参见图像示例)。
从您在步骤 1 中单击图标时启动的菜单中选择 关于 GitHub 桌面。
如果有可用更新,您将被允许单击重新启动以安装更新。
这是imgur
上的link到all the steps screen grabbed off the app
如果您想使用 worktree
为什么不安装 MSYS2?
MSYS2 是 mSysGit 的一个分支,不再维护
它就像一个 unix 控制台,你可以更新你自己的 git 版本,感谢 Pacman,它是 Archlinux
的包管理器
希望对您有所帮助!
此致
EDIT :如果您只想使用 "Git For Windows",here 是 Git v2.6.3 附带的最后一个版本。
我想使用 git 2.5
中引入的新 worktree
功能。但是,我不知道如何更新到最新版本的 GitHub 桌面( 而不是 git 本身)。
我安装 GitHub for desktop 并希望它附带最新版本,但是 git --version
returns git version 1.9.5.github.0
。但如果我没理解错的话,我们已经是第 2 版了。6.x!那么如何在我的 Windows 机器上更新到这个版本,我安装的 git 的唯一版本是 GH Desktop?
您可以在此处找到 Windows Git 安装程序:http://www.git-scm.com/
为了获得最佳效果,我建议卸载 Github 桌面,安装 Git(您从上面 link 下载的),然后重新安装 Github 客户端.
2015 年 11 月 25 日更新。
对于它的价值,GitHub Desktop(终于)使用更新的 git 版本:2.5。参见 Brendan Foster tweet。
原始答案(2015 年 11 月上旬)
首先,windows release is available here on GitHub 的最新 git。
我总是使用存档便携形式(在我想要的任何地方解压缩,并添加到 PATH
)。
但是,如果您选择了 exe
安装程序,则意味着它已安装在 C:\Program Files\Git
中。
但是,as I mentioned here、git也包含在GitHub Desktop自己的安装路径中(%USERPROFILE%\AppData\Local\GitHub\PORTAB~1\bin
)
理论上,您可以将文件夹 PORTAB~1 的确切值替换为目录 JUNCTION:
cd %USERPROFILE%\AppData\Local\GitHub
dir # take note of the exact name of PORTABLEGIT folder: <PORTAB...>
move <PORTAB...> old_PORTABLEGIT
mklink /J <PORTAB...> "C:\Program Files\Git"
在我最新的 GitHub Desktop 3.0.7.1 3397ae4 中,我看到:
C:\Users\vonc\AppData\Local\GitHub\PortableGit_c2ba306e536fdf878271f7fe636a147ff37326ad\bin
然而,那是行不通的:再次启动 GitHub Desktop 时,它会检测到更改并恢复其自己的嵌入式 Git 版本 (1.9.5)
因此您不能轻易地强制 GitHub Desktop 使用另一个 git 版本。
即使您能够以某种方式强制 GitHub for Desktop 使用另一个版本的 Git,您也必须仔细报告其内部 git 系统配置:
C:\Users\vonc\AppData\Local\GitHub\PortableGit_c2b...\etc\gitconfig
此文件指向 GitHub 桌面特定设置:
[http]
sslcainfo = /bin/curl-ca-bundle-ghfw.crt
[credential]
helper = !github --credentials
[filter "ghcleansmudge"]
clean = cat
smudge = cat
这些设置不存在于Git的非GitHub嵌入式版本中,需要恢复。
此处列出了描述 steps required to update github for windows 的说明:
在WindowsGithub的右上角,点击那个小齿轮的图标或者齿轮(参见图像示例)。
从您在步骤 1 中单击图标时启动的菜单中选择 关于 GitHub 桌面。
如果有可用更新,您将被允许单击重新启动以安装更新。
这是imgur
上的link到all the steps screen grabbed off the app
如果您想使用 worktree
为什么不安装 MSYS2?
MSYS2 是 mSysGit 的一个分支,不再维护
它就像一个 unix 控制台,你可以更新你自己的 git 版本,感谢 Pacman,它是 Archlinux
希望对您有所帮助!
此致
EDIT :如果您只想使用 "Git For Windows",here 是 Git v2.6.3 附带的最后一个版本。