git查看提交修改的文件列表

git log 输出的是提交记录的记录id,没有详细的文件或修改信息,我们需要进一步利用git命令和记录id来查看详细的列表或修改。

MacBook-Pro:project eagle$ git log
commit 2c9300e418c3774af4ce5210a0a73bbce6706fa6 (HEAD -> master, origin/master, origin/HEAD)
Author: eagle <eagle@163.com>
Date:   Sat Feb 25 10:02:08 2023 +0800

   提交说明信息

commit b1a2a4abd077c29894094601aacdf2e3781071c7
Author: eagle <eagle@163.com>
Date:   Sat Feb 25 09:59:06 2023 +0800
  1. 查看最后一次提交记录的修改文件信息
 git show --raw
  1. 查看指定commit id对应修改文件列表
git show --raw commit_id

git show --raw 2f80f1c8bb2cb8e91d22ad38480b681c194f6518
  1. 查看所有提交记录的修改文件信息
git log --stat

git log --name-only
  1. 查看所有修改相关的commit ID和comment信息
git log --pretty=oneline
  1. 查询指定author的修改信息
git log --author=jack.li
  1. 查看指定author在指定时间修改信息
$ git log --pretty="%h - %s" --author='Junio C Hamano' --since="2008-10-01" \

--before="2008-11-01" --no-merges -- t/

5610e3b - Fix testcase failure when extended attributes are in use

acd3b9e - Enhance hold_lock_file_for_{update,append}() API

f563754 - demonstrate breakage of detached checkout with symbolic link HEAD

d1a43f2 - reset --hard/read-tree --reset -u: remove unmerged new paths

51a94af - Fix "checkout --track -b newbranch" on detached HEAD

b0ad11e - pull: allow "git pull origin $something:$current_branch" into an unborn branch

Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐