You staged a file with git add and want to remove it from staging without losing changes.
git reset <filename>
This removes the file from the staging area. Your changes in the working directory are untouched — nothing is lost.