git diff --no-index
is pretty much just an ordinary diff
, if you want to apply change hunks across arbitrary files, use an ordinary merge tool like vimdiff
-- which is even harder to distinguish from vimdiff
used as a Git mergetool because it's the same exact thing.
git add
is for adding content to the repo, you're not working on two paths from the work tree, you're working on a single path from the work tree and whatever content is indexed at that path. In particular, you don't get the option to have two different names.
But Git itself finds its work tree (and repo, and objects, and index…) only if
you don't explicitly tell it where they are. If you've got a snapshot of filea
somewhere, say at /path/to/filea
, you can
git --work-tree /path/to add -p filea`
and git will obligingly do a patch-add from the filea
at that path to the filea
content registered in the index.