How to undo a "git add" before a commit?

18

I mistakenly added arquivos using the command git add and I have not yet executed a git commit . Is there a way to undo or remove these commit files?

    
asked by anonymous 05.05.2015 / 18:07

1 answer

20

To undo the inclusion of an item do:

git reset <nomearquivo>

If you made git add . you can undo the inclusion of all files at once, by doing:

git reset
    
05.05.2015 / 18:10