One of the 100 questions in this topic
How much do you know about Git and Version Control?The git reset HEAD [file] command is used to undo changes in the staging area by moving them back to the working directory without losing them. In newer Git versions, git restore --staged can also be used.