I have committed a file with some changes. But now i don't want that changes so how should i revert back to original file keeping other files changes for next commit.
ex: file1.c file2.c file3.c
I made changes in all three files and committed.
Now i don't want file1.c changes, i want as of original.
i tried below but its not working.
git checkout HEAD^ file1.c
git checkout file1.c
git commit --amend
What else i am missing .?