> For the complete documentation index, see [llms.txt](https://www.git-help.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.git-help.com/commands/git-undo-add.md).

# Undo git add

Lets say you mistakenly added a file using the following command.

```
git add abc.txt
```

To undo adding run the following.&#x20;

```bash
git reset HEAD abc.txt
```

**Dont do git reset, you will loose changes**&#x20;

```bash
git reset abc.txt    < ---- DONT DO THIS
```

<https://stackoverflow.com/questions/348170/how-do-i-undo-git-add-before-commit>
