GIT对比两个版本间存在变化的文件

git diff --name-status HEAD~2 HEAD~3

HEAD~2 HEAD~3分别对应两次提交的md5值

结果:

	new file:   static/favicon.png
	new file:   static/img/login-bg-min.png
	renamed:    src/assets/img/logo.png -> static/img/logo-16x16.png
	new file:   static/img/logo-192x192.png
	new file:   static/img/logo-32x32.png
	new file:   static/img/logo-96x96.png
	new file:   static/img/logo.png

结果中包含对文件的操作类型 增删改 等

猜你喜欢

转载自my.oschina.net/coderman/blog/1614853