我正在运行一个遇到冲突的变基:
$ git rebase master
First, rewinding head to replay your work on top of it...
Applying: Better `SelectMotifsView.js`
Using index info to reconstruct a base tree...
M browser/AddLinkView.js
M browser/SelectMotifsView.js
M browser/index.html
Falling back to patching base and 3-way merge...
Auto-merging browser/index.html
CONFLICT (content): Merge conflict in browser/index.html
Failed to merge in the changes.
Patch failed at 0001 Better `SelectMotifsView.js`
The copy of the patch that failed is found in:
/Users/dmitry/dev/links/.git/rebase-apply/patch
When you have resolved this problem, run "git rebase --continue".
If you prefer to skip this patch, run "git rebase --skip" instead.
To check out the original branch and stop rebasing, run "git rebase --abort".
没什么大不了的——我做了一个我知道会引起冲突的小改变:
diff --cc browser/index.html
index ba9c4f3,4c2a1c2..0000000
--- a/browser/index.html
+++ b/browser/index.html
@@@ -40,6 -40,7 +40,10 @@@
<label>
<%= label %>
<select class="form-control" name="motif">
++<<<<<<< HEAD
++=======
+ <% console.log(exclude); %>
++>>>>>>> Better `SelectMotifsView.js`
<% motifs.each(function(motif) { if (!exclude || exclude.indexOf(motif) < 0) { %>
<option value="<%= motif.get('id') %>"><%= motif.get('name') %></option>
<% } }); %>
我想保留该版本HEAD
,它是空的,所以我进去并删除整个:
++<<<<<<< HEAD
++=======
+ <% console.log(exclude); %>
++>>>>>>> Better `SelectMotifsView.js`
我保存文件,browser/index.html
, then git add browser/index.html
:
$ git add browser/index.html
$ git rebase --continue
但是之后:
Applying: Better `SelectMotifsView.js`
No changes - did you forget to use 'git add'?
If there is nothing left to stage, chances are that something else
already introduced the same changes; you might want to skip this patch.
When you have resolved this problem, run "git rebase --continue".
If you prefer to skip this patch, run "git rebase --skip" instead.
To check out the original branch and stop rebasing, run "git rebase --abort".
以前从未见过这个...git status
显示没有剩余的未解析路径。该怎么办?我在其他相关问题上读到这可能是一个很好的用途--skip
,但这似乎不是空提交。还是我错了?