git 查看单独一个文件的修改历史 指定人提交 git log 过滤 比较不同分支文件差异

 比较远程2个分支指定文件差异  -- 为文件相对仓库更目录路径。

git diff origin/master origin/test  -- toot/xx/common.py

 

过滤文件的变动类型

只显示变动的文件名,不显示文件变动详情

$ git diff --diff-filter=M --stat-count=100
testApp/App.vue | 51 ++--
testApp/pages/app_V2/bindPhone.vue | 258 ++++++++---------
testApp/pages/app_V2/completeMaterial.vue | 456 ++++++++++++++----------------
3 files changed, 360 insertions(+), 405 deletions(-)

 

 

 

指定人提交

git log --author="xx@qq.com"
git log --author="who"

 

 

 

实践:

1)

git log -p filenam

可以显示每次提交的diff

2)

git log --pretty=oneline filenam

仅该文件的提交信息

1)=2)+文件具体变动

 

 

git查看某个文件的修改历史 - balenofly - 博客园 https://www.cnblogs.com/flyme/archive/2011/11/28/2265899.html

 

 

1. git log filename

可以看到fileName相关的commit记录

 

2. git log -p filenam

可以显示每次提交的diff

 

3. 只看某次提交中的某个文件变化,可以直接加上fileName

 

git show c5e69804bbd9725b5dece57f8cbece4a96b9f80b filename 

 

git 查看单独一个文件的修改历史_ahjxhy2010的博客-CSDN博客_git查看某个文件的修改历史 https://blog.csdn.net/ahjxhy2010/article/details/80047553

 

 

 

 

 

 

git 查看单独一个文件的修改历史_ahjxhy2010的博客-CSDN博客_git查看某个文件的修改历史 https://blog.csdn.net/ahjxhy2010/article/details/80047553

posted @ 2021-12-10 14:57  papering  阅读(5512)  评论(0编辑  收藏  举报