我正在使用SourceTree for macOS作为git-repository。我在git-flow上创建了一个功能,我完成了。当我尝试将其设为“完成功能”时,我收到此错误消息:
flags:ERROR short flag required for (showcommands) on this platform
flags:ERROR short flag required for (push) on this platform
flags:ERROR short flag required for (keepremote) on this platform
flags:ERROR short flag required for (keeplocal) on this platform
flags:ERROR short flag required for (squash-info) on this platform
flags:ERROR short flag required for (no-ff!) on this platform
/Applications/Sourcetree.app/Contents/Resources/git_local/gitflow/gitflow-common: line 81: [: -eq: unary operator expected
/Applications/Sourcetree.app/Contents/Resources/git_local/gitflow/gitflow-common: line 81: [: -eq: unary operator expected
fatal: could not read Password for 'https://USERNAME@bitbucket.sitename.com': Device not configured
Fatal: Could not fetch feature/Passenger_Type from origin.
当我尝试提交常规更改时,我收到了成功消息。我检查了gitflow-common可执行文件,这是第81行:
if [ -f ~/.gitflow_export ]; then
if grep -E 'GITFLOW_FLAG_(SHOWCOMMANDS|INIT|FEATURE|HOTFIX|RELEASE|SUPPORT)' ~/.gitflow_export > /dev/null; then
echo "Using environment variables for \"showcommands\", \"init\", \"feature\", \"hotfix\", \"release\" and \"support\" in ~/.gitflow_export has deprecated, use git config instead."
echo ""
exit 1;
else
. ~/.gitflow_export
fi
fi
答案 0 :(得分:2)
我在运行Sourcetree 2.7.1(159)的macOS上遇到了同样的问题,试图关闭一个功能分支。
我不想创建未来的错误,所以我只是降级到2.6.3,一切都按预期工作。
fyi,我相信这是一个已知问题,将在未来的sourcetree版本中得到解决。
供参考:我找到了一篇描述该问题的文章以及2.7.1版本的可能解决方案(159): https://community.atlassian.com/t5/Sourcetree-questions/Is-git-flow-broken-in-Sourcetree-2-7-1/qaq-p/728759