首页 > 解决方案 > 致命:模棱两可的参数'origin/feature/appjhagsd':未知的修订版或路径不在工作树中

问题描述

我正在使用 hubflow 工具。我只是克隆一个空的存储库。添加测试文件和提交更改,然后通过git hf push但每次我收到相同的错误消息时将新更改推送到存储库:致命:模糊参数'origin/feature/appjhagsd':未知修订或路径不在工作树中。我使用了这些简单的命令:

cd testrepo/
git hf init
git hf feature start appjhagsd
Switched to a new branch 'feature/appjhagsd'

git status
On branch feature/appjhagsd
nothing to commit, working directory clean

touch abc
git status 
On branch feature/appjhagsd
Untracked files:
  (use "git add <file>..." to include in what will be committed)

    abc


git add .
git commit -m "test"
[feature/appjhagsd 4bf5907] test
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 abc

git hf push
Fetching origin
fatal: ambiguous argument 'origin/feature/appjhagsd': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: Not a valid object name origin/feature/appjhagsd
merge: origin/feature/appjhagsd - not something we can merge

There were merge conflicts. To resolve the merge conflict manually, use:

    git mergetool
    git commit

You should then push your changes back up to 'origin', using:

    git push 'origin' 'feature/appjhagsd'

After you have pushed back to 'origin', please retry your HubFlow command

为了临时解决这个问题,我正在使用 thise 命令:git push -u origin origin/feature/appjhagsd但这不应该发生,如果您有任何想法,请帮助我。

标签: gitgithubgitlabbitbuckethubflow

解决方案


我认为没有适当的解决方案,但它会以某种方式起作用。我只是从上面给出的问题的最后一行复制粘贴了这个命令:git push 'origin' 'feature/appjhagsd'

然后它将被推送到上面的分支,但仍然git hf push应该可以正常工作吗?,我相信它以前工作得很好,现在我认为有一些问题。复制粘贴上述命令后,git hf push将起作用。

但是如果我创建另一个特性分支,那么同样的事情会发生,你必须做上面解释的同样的事情来解决这个问题。


推荐阅读