开发者

How do I view previous diff commits using Git?

开发者 https://www.devze.com 2023-03-02 22:07 出处:网络
How do I view previous diff commits using Git? 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 m

How do I view previous diff commits using Git?

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开发者_如何学JAVA 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

Check out:
http://git-scm.com/docs/git-log


You need git log. If you were interested in file SOMEFILE use

$ git log -p SOMEFILE

The -p option displays the patch which is probably the diff you are looking for.


If you don't want to specify a particular file, and see the diff for all files changed, just use

$ git log -p
0

精彩评论

暂无评论...
验证码 换一张
取 消