首页 > 解决方案 > 无法识别 Git Flow Init 命令 - 未找到命令

问题描述

我继承了我公司以前的开发人员使用的工作站。在我开始之前,IT 没有擦除 + 重新配置笔记本电脑,我相信这可能就是我看到这些问题的原因。

我正在尝试从我的 ConEmu 终端运行 git flow 命令。似乎 git-flow 已安装并被识别,但每次我尝试运行 gitflow 命令时,我都会得到这样的打印输出

git flow init
C:/Program Files/Git/usr/bin/gitflow-shFlags: line 398: tr: command not found
flags:WARN definition for ([no]showcommands) already exists
C:/Program Files/Git/usr/bin/gitflow-shFlags: line 398: tr: command not found
flags:WARN definition for ([no]force) already exists
C:/Program Files/Git/usr/bin/gitflow-shFlags: line 398: tr: command not found
flags:WARN definition for ([no]defaults) already exists
C:/Program Files/Git/usr/bin/gitflow-shFlags: line 398: tr: command not found
flags:WARN definition for ([no]local) already exists
C:/Program Files/Git/usr/bin/gitflow-shFlags: line 398: tr: command not found
flags:WARN definition for ([no]global) already exists
C:/Program Files/Git/usr/bin/gitflow-shFlags: line 398: tr: command not found
flags:WARN definition for ([no]system) already exists
C:/Program Files/Git/usr/bin/gitflow-shFlags: line 398: tr: command not found
flags:WARN definition for ([no]file) already exists
C:/Program Files/Git/usr/bin/gitflow-shFlags: line 398: tr: command not found
flags:WARN definition for ([no]feature) already exists
C:/Program Files/Git/usr/bin/gitflow-shFlags: line 398: tr: command not found
flags:WARN definition for ([no]bugfix) already exists
C:/Program Files/Git/usr/bin/gitflow-shFlags: line 398: tr: command not found
flags:WARN definition for ([no]release) already exists
C:/Program Files/Git/usr/bin/gitflow-shFlags: line 398: tr: command not found
flags:WARN definition for ([no]hotfix) already exists
C:/Program Files/Git/usr/bin/gitflow-shFlags: line 398: tr: command not found
flags:WARN definition for ([no]support) already exists
C:/Program Files/Git/usr/bin/gitflow-shFlags: line 398: tr: command not found
flags:WARN definition for ([no]tag) already exists
C:/Program Files/Git/usr/bin/gitflow-shFlags: line 398: tr: command not found
flags:WARN definition for ([no]help!) already exists
flags:FATAL unrecognized option (,)

我已经尝试为 Windows 安装最新版本的 git,看看是否会“修复”gitflow 安装

我试过其他终端模拟器,比如 windows cmd 和 gitbash。

作为一种解决方法,我必须登录我们的一个沙箱服务器,安装 git for windows,然后在那里运行 git flow 命令。

标签: windowsgitgit-bashatlassian-sourcetreegit-flow

解决方案


尝试重新安装 git flow,它对我有用。

brew unlink git-flow-avh
brew reinstall git-flow

推荐阅读