我正在交互式地添加一个文件:
git add ../../template/panels/panel-reports.php -p
diff --git a/template/panels/panel-reports.php b/template/panels/panel-reports.php
index 5482228..48d2901 100644
--- a/template/panels/panel-reports.php
+++ b/template/panels/panel-reports.php
@@ -214,6 +214,8 @@
<a class="addCategory"></a>
<a class="removeCategory"></a>
+ <a class="addDocument"></a>
+ <a class="checkTool"></a>
<div class="categoriesList"></div>
<div class="documentsList"></div>
Stage this hunk [y,n,q,a,d,/,e,?]? e
注:这里只有这些修改过的行。
我想要移除
+ <a class="checkTool"></a>
那么我像这样编辑:
# Manual hunk edit mode -- see bottom for a quick guide
@@ -214,6 +214,7 @@
<a class="addCategory"></a>
<a class="removeCategory"></a>
+ <a class="addDocument"></a>
<div class="categoriesList"></div>
<div class="documentsList"></div>
# ---
# To remove '-' lines, make them ' ' lines (context).
# To remove '+' lines, delete them.
# Lines starting with # will be removed.
但是 Git 拒绝了它:
error: patch failed: template/panels/panel-reports.php:214
error: template/panels/panel-reports.php: patch does not apply
Your edited hunk does not apply. Edit again (saying "no" discards!) [y/n]?
我认为我写的内容没有错误或歧义,那么我错在哪里了吗?