DEV Community

nabbisen
nabbisen

Posted on

Reset git add

I sometimes meet the situation:

$ git add <some-file>
Enter fullscreen mode Exit fullscreen mode

"Oh, it was mistake ( ゚д゚)"

In such a case, git reset HEAD <some-file> is available.

$ git reset HEAD <some-file>
Unstaged changes after reset:
M   <some-file>
Enter fullscreen mode Exit fullscreen mode

Happier a bit😊

Top comments (0)