---
title: "Comment by Lee Doolan on \"Git  Commands you may not know but can be very useful\" | Hashnode"
description: "I generally use git add - e &lt; file &gt; instead of git add - p \\ &lt; file\\ &gt; You can modify the patch hunks with a text editor with git add -e . It is mu"
url: "https://hashnode.com/posts/git-commands-you-may-not-know-but-can-be-very-useful/6313a09dd49bb9d8c2f746ee/comment/6314bd25041b51e1712e4ce3"
---

[Discussion](https://hashnode.com/posts/git-commands-you-may-not-know-but-can-be-very-useful/6313a09dd49bb9d8c2f746ee)

Comment [Git Commands you may not know but can be very useful](https://hashnode.com/posts/git-commands-you-may-not-know-but-can-be-very-useful/6313a09dd49bb9d8c2f746ee)

[Lee Doolan](https://hashnode.com/@leed25d)

[Sep 4, 2022](https://hashnode.com/posts/git-commands-you-may-not-know-but-can-be-very-useful/6313a09dd49bb9d8c2f746ee/comment/6314bd25041b51e1712e4ce3)

I generally use

```
   git add -e <file>

instead of
    git add -p \<file\>
```

You can modify the patch hunks with a text editor with _git add -e_ . It is much more convenient in my opinion.

[Hitesh Pal](https://hashnode.com/@hitesh7738)

[Sep 4, 2022](https://hashnode.com/posts/git-commands-you-may-not-know-but-can-be-very-useful/6313a09dd49bb9d8c2f746ee/comment/6314bd25041b51e1712e4ce3#reply-6314cc39d49bb9d8c2f771b2)

Yeah with git add -e we can do both things(and it's a great feature in git) but sometimes it can be very confusing for me so I use patch instead of edit.
