git - 在 git status 之前不能 git merge --abort
问题描述
首先我合并某事,然后发生冲突,所以我git merge --abort
,但是失败了,我必须先做git status
,然后git merge --abort
成功。
$ git merge features/test
Auto-merging src/cmd.c
CONFLICT (content): Merge conflict in src/main.c
Auto-merging src/client.c
Automatic merge failed; fix conflicts and then commit the result.
$ git merge --abort
error: Entry 'src/option.h' not uptodate. Cannot merge.
fatal: Could not reset index file to revision 'HEAD'.
$ git merge --abort
error: Entry 'src/option.h' not uptodate. Cannot merge.
fatal: Could not reset index file to revision 'HEAD'.
$ git status
# On branch te
# You have unmerged paths.
# (fix conflicts and run "git commit")
#
# Changes to be committed:
#
**********
#
# Unmerged paths:
# (use "git add <file>..." to mark resolution)
#
**********
#
$ git merge --abort
$ git status
# On branch te
nothing to commit, working directory clean
我做错了什么吗?
git 版本 1.8.3.1
解决方案
我做错了什么吗?
不:git merge --abort
应该可以工作,而不必先运行git status
。报告您使用的任何 Git 版本的错误。 编辑: 1.8.3.1 确实很古老。如果可能,您应该升级。
推荐阅读
- azure-ad-b2c - Blazor WASM B2C - AccessTokenNotAvailableException 上的重定向
- javascript - 无法加载资源:net::ERR_INSUFFICIENT_RESOURCES 与循环 ajax 查询
- excel - 不使用导入方法将问题插入 pg admin
- flutter - dart/flutter - 在 gridview 中向下显示双倍的列表条目
- javascript - 如何使用 javascript 从拖放上传器中删除文件?
- c++ - CUDA周期性执行时间
- r - 以条件 cummin 方式迭代地替换组内的值
- javascript - 如何在 React/Node Web 应用程序中无缝录制/修剪/组合音频
- python - Pandas:使用lines = True在json中强制执行数据帧dtypes
- reactjs - 有没有办法通过 Promise 初始化 React 状态?