One of the 100 questions in this topic
The git restore <file_name> command is used to restore file versions from earlier commits.