我只是尝试安装git-flow,但是,它似乎没有与git正确集成,我该怎么做才能将gitflow与git集成?我有办法手动完成这个吗?
谢谢你, 杰弗里
[root@sa 2]# wget --no-check-certificate -q -O - https://github.com/nvie/gitflow/raw/develop/contrib/gitflow-installer.sh | sudo bash
### gitflow no-make installer ###
Installing git-flow to /usr/local/bin
Cloning repo from GitHub to gitflow
Cloning into gitflow...
remote: Counting objects: 2362, done.
remote: Compressing objects: 100% (957/957), done.
remote: Total 2362 (delta 1406), reused 2238 (delta 1316)
Receiving objects: 100% (2362/2362), 484.60 KiB, done.
Resolving deltas: 100% (1406/1406), done.
Updating submodules
Submodule 'shFlags' (git://github.com/nvie/shFlags.git) registered for path 'shFlags'
Cloning into shFlags...
remote: Counting objects: 454, done.
remote: Compressing objects: 100% (55/55), done.
Receiving objects: 100% (454/454), 101.19 KiB, done.
Resolving deltas: 100% (389/389), done.
remote: Total 454 (delta 389), reused 454 (delta 389)
Submodule path 'shFlags': checked out '2fb06af13de884e9680f14a00c82e52a67c867f1'
removed `/usr/local/bin/git-flow'
`gitflow/git-flow' -> `/usr/local/bin/git-flow'
removed `/usr/local/bin/git-flow-init'
`gitflow/git-flow-init' -> `/usr/local/bin/git-flow-init'
removed `/usr/local/bin/git-flow-feature'
`gitflow/git-flow-feature' -> `/usr/local/bin/git-flow-feature'
removed `/usr/local/bin/git-flow-hotfix'
`gitflow/git-flow-hotfix' -> `/usr/local/bin/git-flow-hotfix'
removed `/usr/local/bin/git-flow-release'
`gitflow/git-flow-release' -> `/usr/local/bin/git-flow-release'
removed `/usr/local/bin/git-flow-support'
`gitflow/git-flow-support' -> `/usr/local/bin/git-flow-support'
removed `/usr/local/bin/git-flow-version'
`gitflow/git-flow-version' -> `/usr/local/bin/git-flow-version'
removed `/usr/local/bin/gitflow-common'
`gitflow/gitflow-common' -> `/usr/local/bin/gitflow-common'
removed `/usr/local/bin/gitflow-shFlags'
`gitflow/gitflow-shFlags' -> `/usr/local/bin/gitflow-shFlags'
[root@sa 2]# git flow
git: 'flow' is not a git command. See 'git --help'.
Did you mean one of these?
reflog
show
答案 0 :(得分:9)
删除git-flow并手动安装。
在Linux上:
sudo apt-get remove git-flow && wget --no-check-certificate -q -O - https://raw.github.com/nvie/gitflow/develop/contrib/gitflow-installer.sh | sudo bash
在Windows上
如果你使用cygwin,请确保安装了util-linux和wget。然后用cygwin运行:
wget -q -O - --no-check-certificate github.com/nvie/gitflow/raw/develop/contrib/gitflow-installer.sh | bash
有关详细信息,请查看project page on github
答案 1 :(得分:7)
正如评论中所述,/usr/local/bin
中很可能未$PATH
设置echo $PATH
。通过执行/usr/local/bin
进行检查,如果没有显示$PATH
,请将其添加到{{1}}。
答案 2 :(得分:1)
我在Windows 10(SourceTree)上遇到此问题。
我在“用户的环境变量”中的PATH变量中添加了以下文件夹
%USERPROFILE%\AppData\Local\Atlassian\SourceTree\git_local\usr\bin
我关闭并重新打开SourceTree-问题已解决。
答案 3 :(得分:0)
在 Ubuntu 上,它只需要安装
sudo apt-get install -y git-flow
然后 git flow
命令将运行正常...其他提到 PATH 的答案已过时,因为 git-flow 它不是一个独立的可执行文件,它直接由 git 在内部使用