git - 致命:模棱两可的参数'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
但这不应该发生,如果您有任何想法,请帮助我。
解决方案
我认为没有适当的解决方案,但它会以某种方式起作用。我只是从上面给出的问题的最后一行复制粘贴了这个命令:git push 'origin' 'feature/appjhagsd'
然后它将被推送到上面的分支,但仍然git hf push
应该可以正常工作吗?,我相信它以前工作得很好,现在我认为有一些问题。复制粘贴上述命令后,git hf push
将起作用。
但是如果我创建另一个特性分支,那么同样的事情会发生,你必须做上面解释的同样的事情来解决这个问题。
推荐阅读
- testing - 如何使用 Botium 脚本内存文件
- javascript - 反正有没有用javascript检测警报?
- c++ - posix_memalign 内存分配和内存空闲
- android - 如何通过单击网格视图项获取图像,然后将其保存在 SQLite 数据库中
- angular - 在primeng控件中显示为框的primeng图标
- android - Android Firebase Query 在不同的键中查找多个值
- unit-testing - 模拟父级内部依赖
- json - 使用 jq 合并两个文件
- java - 如何运行特定的测试类基础系统属性“环境”?
- node.js - 如何读取我从服务器获取的图像作为缓冲区?