Original Note

查看Diff

  • self_study_notes
  • Original Note
  • Updated: 2026-10-12T10:39:27+08:00
Source provenance
Canonical route
/original-notes/self_study_notes/git/查看diff
Source path
self_study_notes/git/查看diff.md
Content hash
4cc359c0871d2ce4aeaa70eddb99df86d3def6f7b37e66ed6ae8f4345a199d3c
Updated commit
c9c2d5eccd9ee09ce82352f0570d53e8b75bbb2e
Updated at
2026-10-12T10:39:27+08:00
Document type
Original Note
Source Collection
self_study_notes
Source Path
self_study_notes/git/查看diff.md
Type
Original Note
Updated At
2026-10-12T10:39:27+08:00
git diff                 # 未 add 的修改
git diff --staged        # 已 add 的修改
git diff HEAD            # 所有未 commit 修改

git show <commit>        # 看某一个 commit 做了什么
git diff A B             # 比较两个 commit
git show --stat <commit> # 看 commit 修改概览
默认使用的是pager分页器,而不是编辑器

Evidence-backed relations

Source Note · Same Topic

切换到中文