在一次尚未commit的代码中,
git diff > test.patch
patch文件可以被放在任何地方 将文件恢复到初始状态
git checkout .
应用patch
git apply test.patch