here is the scenario i have, which i believe is pretty common:
- file A on branch
master
. - i
fork master
intofeature
- now i add several commits on the feature branch changing file A.
- i undo several edits (by editing the file more to remove the changes) so that the file is the same in branch master because my changes weren't that smart
- i do a new change and want to see if i removed everything from before
- my first try is
git diff master...
but that shows the same diff from git diff
it does not show the changes from master to now.
example contents and diff
$ git checkout master
$ cat a
line 1
line 2
$ git checkout feature
$ cat a
line 1-1
line 2-2
line 3
line 4
$ edit a #< from now on a is not indexed, it is locally edited
$ cat a
line 1
line 2
line 3
$ git diff
--- a
- line 1-1
- line 1-2
+ line 1
+ line 2
line 3
- line 4
$ git diff master...
--- a
- line 1-1
- line 1-2
+ line 1
+ line 2
line 3
- line 4
the diff i want to get is:
$ git diff ???
--- a
line 1
line 2
+ line 3