How do I find common files changed between git branches?
git
Solution
Expanded a bit: for you first part of the question, make a new branch, automatically do the rebase there, and then compare to your working copy.
git branch workBranch
git commit #throw your locals into your own branch for a brief moment
git branch testBranch
git rebase otherBranch
git diff workBranch
You might also get away with just doing a "git diff origin/branchToMerge"
For the interactive part:
git rebase --interactive.
Set all the commits to "Edit" and you'll be taken through each of them one-by-one giving you a chance to see everything done for that commit and edit to your heart's content.
EDIT to answer comment
OK, for strictly seeing changed files, do:
git log a0a0a0..b1b1b1 --name-only --pretty=oneline | egrep -v '^[a-f0-9]{40} ' | sort | uniq > lista
git log a0a0a0..c2c2c2 --name-only --pretty=oneline | egrep -v '^[a-f0-9]{40} ' | sort | uniq > listb
cat lista listb | sort | uniq -d
That bit of shell kludgery will show you only files that changed in both logs. For a0a0a0, use your common point. Replace the b1/c2 strings with the tips of the two diverging branches.
Problem
I have an upstream repository with some changes. I have local changes I want to rebase onto the upstream changes. I want to know what files I've changed locally have also changed upstream so I can check any automatic merging. Alternatively, I'd like to manually do any merges during the rebase.