git 技巧两则

今天有同事问git如何查被删除的文件记录,以前遇到过不记得了,回去查了查man手册。

找被删除的文件记录:git log —diff-filter=D

找被重命名的文件记录:git log -M 或者 git log —follow new_file_name

记录一下。