For a specific file :
- git reset my_file.txt
- git checkout my_file.txt
For all added files :
- git reset .
- git checkout .
Note : checkout change the codes in file and move to the last updated state. reset doesn't change the codes it just reset the header.
Note: checkout changes the code in the files and moves to the last updated (committed) state. reset doesn't change the codes; it just resets the header.