diff
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCompare Dependencies
对比依赖
See what dependencies changed between two points in time.
查看两个时间节点之间的依赖变更情况。
Commands
命令
Compare HEAD against working tree (like ):
git diffbash
git-pkgs diffCompare 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.0Show dependency changes in a specific commit:
bash
git-pkgs show
git-pkgs show abc1234Compare two manifest or lockfiles directly:
bash
git-pkgs diff-file Gemfile.lock.old Gemfile.lockOptions:
- - filter by ecosystem
--ecosystem=ECO - - JSON output
--json
对比HEAD与工作区(类似):
git diffbash
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)中的依赖变更
- 对比不同版本发布之间的依赖
- 运行更新后检查变更内容
- 了解某次特定提交对依赖的影响