During the development process it is common (at least for me) to do several add commands without a commit command between them. From this, I would like to know if git supports undo changes in a file in relation to the last add command performed on it? Here goes a illustrative example:
Suppose you on a clean working tree that has the unique file foo.txt. You change some contents in this file and so you add it to the stage area with the add command. But, instead to do its commit in the sequence, you decide to perform more changes in the file foo.txt. After while, you realize that the changes are unnecessary and you want to undo the changes, not you do not want to undo all changes but just the ones that was done after the add command.
How to do accomplish this?
Thanks