返回 Skill 列表
extension
分类: 开发与工程无需 API Key

diff-since-my-commit

显示自上次提交以来对git分支所做的更改,并仅筛选出你修改过的文件。当用户要求查看其他人对其分支的更改、审查自上次提交以来的更改或将其工作与上游修改进行比较时使用。触发请求如“我的分支上有什么变化”、“显示自上次提交以来的差异”、“其他人对我文件做了哪些更改”或“审查我对PR的更改”。

person作者: jakexiaohubgithub

Diff Since My Commit

Show changes to a git branch since your last commit, filtered to only the files you originally touched.

Usage

scripts/diff_since_my_commit.sh <branch> [email1,email2,...]

Examples:

# Use default git config email
scripts/diff_since_my_commit.sh origin/feature-branch

# Specify multiple emails (if you commit with different emails)
scripts/diff_since_my_commit.sh origin/main "me@gmail.com,me@work.com"

What It Does

  1. Find your most recent commit on the specified branch
  2. Identify files you touched in your commits
  3. Show who else committed since your last commit
  4. Generate a diff of only your files that were modified by others
  5. Open the diff in browser using diff2html (side-by-side view)

Requirements

  • git - for diff generation
  • diff2html-cli - for browser preview (npm install -g diff2html-cli)

Output

The script displays:

  • Your last commit on the branch
  • Number of commits since yours
  • Authors who made changes
  • List of files you touched
  • Opens filtered diff in browser