我加入交互文件:编辑git的补丁提供了“修改过的猛男不适用”
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
PS:那些是这里唯一的修饰线条
我想删除
+ <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]?
对我来说,我没有看到我写的任何错误或歧义,所以我在哪里错了?
确保每个上下文行以前导空格字符“'开头,即使该行是空的。 – ydroneaud 2012-02-29 16:33:42
已浏览[此问题](http://stackoverflow.com/questions/3268596/git-add-interactive-your-edited-hunk-does-not-apply)。 – simont 2012-02-29 21:08:34