例如pom.xml恢复到之前的commit。 先用git log 查看恢复到哪个版本。
git log
git reset e8bc520c86f482c6a59ca9ba5ba3bc19e0c99fe6 pom.xml