Diff Since My Commit
Show changes to a git branch since your last commit, filtered to only the files you originally touched.
Usage
bash
scripts/diff_since_my_commit.sh <branch> [email1,email2,...]
Examples:
bash
# 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
- •Find your most recent commit on the specified branch
- •Identify files you touched in your commits
- •Show who else committed since your last commit
- •Generate a diff of only your files that were modified by others
- •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