简体   繁体   English

内部更新后如何在cmder中更新git

[英]How to update git in cmder after updating it internally

How to make changes after updating the git from the terminal with如何在从终端更新 git 后进行更改

$ git-update-git-for-windows

I want 2 know if how do you update such git inside cmder because in my git bash I see this:我想知道你是否如何在cmder中更新这样的git,因为在我的git bash中我看到了这个:

在此处输入图像描述

But when I go into cmder I see this thing但是当我 go 进入cmder时,我看到了这个东西

在此处输入图像描述

How do you make this two reflect with each other..你如何让这两个相互反映..

As seen here , you can update the PATH of cmder with its user startup script, in cmder\config\user-profile.cmd .如此处所示,您可以在cmder\config\user-profile.cmd中使用其用户启动脚本更新 cmder 的 PATH。

@set PATH=<path_to_Git>\bin;%PATH%

You can also use the cmder system menu ( System Preferences , then click on Advanced system settings → Environment Variables .)您还可以使用cmder 系统菜单System Preferences ,然后单击Advanced system settings → Environment Variables 。)

In the OP's case:在OP的情况下:

@echo off @set PATH=C:\Program Files\Git\mingw64\bin\;%PATH% 

The idea is to add in front of the %PATH% the parent folder (bin) of the correct git.exe (2.24), not the executable itself.这个想法是在%PATH%前面添加正确的git.exe (2.24) 的文件夹 (bin),而不是可执行文件本身。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM