git - Files changed between commits but with limiting file list to older commit -
situation: have old commit need merge selectively latest commit. files have no changes , other files have important changes need review , merge selectively.
let's old commit 1
had files a
, b
, c
.
the latest commit 5
has involved changing files b
, c
since commit 1
, added files d
, e
, f
.
so between commits 1
, 5
files b
, c
have changed, is, running diff
on 1:b
, 5:b
; , on 1:c
, 5:c
show differences.
i need filenames b
, c
only.
that is, files not belonging 1
changed or added until , including 5
should not show up.
you might try
git diff --diff-filter=m 1 5
the available filters are
a
: added c
: copied d
: deleted m
: modified r
: renamed t
: type changed (symlink, regular file, etc.) u
: unmerged x
: unknown b
: pairing broken refer git-diff(1)
manual page details.
edit:
if interested in what changed how between 2 commits, can utilize --name-status
option, every file changed outputs 1 of above codes. alternative can used git-log
telling type of alter made files each of commits.
git merge diff
No comments:
Post a Comment