diff

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Compare Dependencies

对比依赖

See what dependencies changed between two points in time.
查看两个时间节点之间的依赖变更情况。

Commands

命令

Compare HEAD against working tree (like
git diff
):
bash
git-pkgs diff
Compare between commits or branches:
bash
git-pkgs diff main..feature
git-pkgs diff --from=HEAD~10
git-pkgs diff --from=v1.0.0 --to=v2.0.0
Show dependency changes in a specific commit:
bash
git-pkgs show
git-pkgs show abc1234
Compare two manifest or lockfiles directly:
bash
git-pkgs diff-file Gemfile.lock.old Gemfile.lock
Options:
  • --ecosystem=ECO
    - filter by ecosystem
  • --json
    - JSON output
对比HEAD与工作区(类似
git diff
):
bash
git-pkgs diff
对比不同提交记录或分支:
bash
git-pkgs diff main..feature
git-pkgs diff --from=HEAD~10
git-pkgs diff --from=v1.0.0 --to=v2.0.0
查看某次特定提交中的依赖变更:
bash
git-pkgs show
git-pkgs show abc1234
直接对比两个清单文件或锁定文件:
bash
git-pkgs diff-file Gemfile.lock.old Gemfile.lock
选项:
  • --ecosystem=ECO
    - 按生态系统筛选
  • --json
    - 输出JSON格式

When to use

使用场景

  • Reviewing dependency changes in a pull request
  • Comparing dependencies between releases
  • Checking what changed after running an update
  • Understanding the dependency impact of a specific commit
  • 审查拉取请求(PR)中的依赖变更
  • 对比不同版本发布之间的依赖
  • 运行更新后检查变更内容
  • 了解某次特定提交对依赖的影响