git reset file to last commit code example
Example 1: git add file to last commit
git add the_left_out_file
git commit --amend --no-edit
Example 2: git reset last commit
$ git reset --soft HEAD~1
Example 3: How can I reset or revert a file to a specific revision?
git reset <commit hash> <filename>
Example 4: git reset specific file
git checkout c5f567 -- file1/to/restore file2/to/restore