Skip to main content
Described the notation used by git to specify a range.
Source Link
Bob Dalgleish
  • 8.3k
  • 4
  • 35
  • 42

git diff branch1.You can specify a start and range for git diff to be applied to.branch2 The range is indicated with the -- file_path.. notation.

branch1=somebranch branch2=someotherbranch git diff ${branch1}..${branch2} -- file_path 

git diff branch1..branch2 -- file_path

You can specify a start and range for git diff to be applied to. The range is indicated with the .. notation.

branch1=somebranch branch2=someotherbranch git diff ${branch1}..${branch2} -- file_path 
Source Link
JCF
  • 368
  • 3
  • 15

git diff branch1..branch2 -- file_path