---
title: "Discussion on \"Git  Commands you may not know but can be very useful\" | Hashnode"
description: "Discussion on \"Git  Commands you may not know but can be very useful\". Git is a free and open-source Distributed Version Control system. Real-life projects have multiple developers working in parallel. So they need a version co"
url: "https://hashnode.com/posts/git-commands-you-may-not-know-but-can-be-very-useful/6313a09dd49bb9d8c2f746ee"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Git Commands you may not know but can be very useful](https://hiteshpal.hashnode.dev/git-commands-you-may-not-know-but-can-be-very-useful?utm_source=hashnode&utm_medium=feed)

Git is a free and open-source Distributed Version Control system. Real-life projects have multiple developers working in parallel. So they need a version co

Sep 3, 2022 · 4 min read · hiteshpal.hashnode.dev  
Updated Sep 6, 2022  
Read the article

-   [#iwritecode](https://hashnode.com/tag/iwritecode)
-   [#git](https://hashnode.com/tag/git)
-   [#gitcommands](https://hashnode.com/tag/gitcommands)
-   [#github](https://hashnode.com/tag/github)
-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)

## Written by

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

@hitesh7738 · India

  
[View profile](https://hashnode.com/@hitesh7738)

Web Developer

I am a web developer from India learning new things and writing my own blogs to learn and give more to the community.

## Responses 1

Markdown supported · ⌘↵ to post

[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.
