Git 如何只查看commit中某一个文件的变化
本文介绍了Git 如何只查看commit中某一个文件的变化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
一共有三次commit,如,
history_commit_a
history_commit_b
history_commit_c
其中,history_commit_b中有50个文件做了修改,文件名分别为
history_commit_b_file1
history_commit_b_file2
history_commit_b_file3
.
.
.
等等。
那么问题来了。如果我想看history_commit_b中history_commit_b_file50发生了哪些变化,直接使用:
git show history_commit_b;
git会把所有文件的变化一下子全部列出来,能不能用命令控制git只显示出history_commit_b中的history_commit_b_file50文件的变化、而不显示history_commit_b_file1...history_commit_b_file49文件的变化.
解决方案
gitk history_commit_b_file50
git show history_commit_b history_commit_b_file50
这篇关于Git 如何只查看commit中某一个文件的变化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文