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.
git gui
, and use the graphical interface to amend your changes – LeGEC Commented Jan 22 at 15:32