如何使用Git查看以前的差异提交? [英] How do I view previous diff commits using Git?

查看:54
本文介绍了如何使用Git查看以前的差异提交?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用Git查看以前的差异提交?

How do I view previous diff commits using Git?

我有一个已提交了多个文件的文件,但是我想在不同阶段查看文件的先前版本及其差异.看看我在哪里犯了错误,以及如何解决这些错误,确实对我的代码有所帮助.顺便说一句,我正在使用Tower作为Git之上的GUI.

I have a file that I've made several commits on, but I want to view previous versions of the file AND its diff's at different stages. Seeing where I made mistakes and how I fixed them is really helping my code. By the way, I'm using Tower as a GUI on top of Git.

推荐答案

git log --full-diff -p your_file_path

退房:
http://git-scm.com/docs/git-log

这篇关于如何使用Git查看以前的差异提交?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆