admin管理员组文章数量:1317898
I have the following git diff for Python code:
@@ -520,7 +520,7 @@ class AreaManager:
self.broadcast_ooc(
f"[{client.id}] {client.showname} ({client.name}) is GM in this hub now."
)
- #client.hide(True)
+ client.hide(True)
def remove_owner(self, client):
"""
I want to discard changes using git add -i
by removing the '+' line and restoring the '-' line. I do it as this:
@@ -520,7 +520,7 @@ class AreaManager:
self.broadcast_ooc(
f"[{client.id}] {client.showname} ({client.name}) is GM in this hub now."
)
#client.hide(True)
def remove_owner(self, client):
"""
I've read these SO questions as well as this blog post, and kept track of spaces and line count, but Git still produces an error:
error: corrupt patch at line 13
How do I make Git apply my changes? What am I missing?
I use Notepad++ v8.4.2 as Git default code editor under Win10 OS.
I have the following git diff for Python code:
@@ -520,7 +520,7 @@ class AreaManager:
self.broadcast_ooc(
f"[{client.id}] {client.showname} ({client.name}) is GM in this hub now."
)
- #client.hide(True)
+ client.hide(True)
def remove_owner(self, client):
"""
I want to discard changes using git add -i
by removing the '+' line and restoring the '-' line. I do it as this:
@@ -520,7 +520,7 @@ class AreaManager:
self.broadcast_ooc(
f"[{client.id}] {client.showname} ({client.name}) is GM in this hub now."
)
#client.hide(True)
def remove_owner(self, client):
"""
I've read these SO questions as well as this blog post, and kept track of spaces and line count, but Git still produces an error:
error: corrupt patch at line 13
How do I make Git apply my changes? What am I missing?
I use Notepad++ v8.4.2 as Git default code editor under Win10 OS.
Share Improve this question edited Jan 24 at 9:30 Guildenstern 3,8982 gold badges28 silver badges53 bronze badges asked Jan 22 at 15:25 user27575278user27575278 93 bronze badges 1 |1 Answer
Reset to default 0Thanks @LeGEC for suggesting using git gui
, amending changes there solved the problem.
本文标签: gitError quotpatch does not applyquot when manually editing diffStack Overflow
版权声明:本文标题:git - Error: "patch does not apply" when manually editing diff - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742036510a2417325.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
git gui
, and use the graphical interface to amend your changes – LeGEC Commented Jan 22 at 15:32