致命:参数“ origin / feature / appjhagsd”含糊不清:未知的修订或路径不在工作树中

时间:2018-08-14 07:32:49

标签: git github gitlab bitbucket hubflow

我正在使用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,但这不应该发生,如果您有任何想法请帮助我。

1 个答案:

答案 0 :(得分:0)

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

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

但是,如果我创建另一个功能分支,则会发生相同的事情,并且您必须执行上述相同的事情来解决此问题。