Git Revert有冲突,当解决它不是实际还原变化?

时间:2014-03-28 06:44:33

标签: git

我已将提交b67564d标识为问题。不知何故,用户设法在之前进行了3次合并,之后进行了3次合并。目前repo看起来像这样(Bar,Joe和Bar代表不同的用户):

Foo: Revert "Fixed Satellite"
...
Joe: Merge branch 'master' of github.com:...... (No Files)
Bar: Merge branch 'master' of github.com:...... (No Files)
Bar: Merge branch 'master' of github.com:...... (2 Files)
Bar: Fixed Satellite                            (5 files: b67564d)
Bar: Merge branch 'master' of github.com:...... (No Files)
Bar: Merge branch 'master' of github.com:...... (No Files)
Bar: Merge branch 'playground'                  (No Files)

所以我跑:git revert b67564d

error: could not revert... hint: after resolving the conflicts, mark the corrected paths hint: with 'git add <paths>' and commit result

所以我跑:git mergetool

所以我解决冲突(这是一个被忽略的日志文件,但一直在找到它)

git status

显示要从b67564d提交的4个文件的更改,不包括最近合并的日志文件。

所以我运行git revert --continue

给出了:

[master cc8b21b] Revert "Fixed Satellite" 4 files changed

现在我看一下据说已经改变的文件,它根本没有改变。

根据要求输出git log --graph --oneline

* cc8b21b Revert "Fixed Satellite"
* fc06865 Revert "Styled accordian on Enterprise edit page but Error displayed if a table is empty"
*   ed07e58 Merge branch 'master' of github.com:x/p-o-2
|\
| * 84fd05e Added scroll bars to accordian panels for mobile responsiveness (too many columns in tables)
| *   010deba Merge branch 'master' of github.com:x/p-o-2
| |\
| | *   bdcc3ae Merge branch 'master' of github.com:x/p-o-2
| | |\
| | * \   e57f0cd Merge branch 'master' of github.com:x/p-o-2
| | |\ \
| | * | | b67564d Fixed Satellite
| | * | |   eaea47a Merge branch 'master' of github.com:x/p-o-2
| | |\ \ \
| | * \ \ \   b3d3f0c Merge branch 'master' of github.com:x/p-o-2
| | |\ \ \ \

0 个答案:

没有答案