git diff .. vs ...
Do you actually know the different between ..
and ...
? and which one you should use?
To figure out which one you would use you got to know what they actually do...
o-o-X-o-o-o-o-Z master
\
-o-o-o-o-o-Y feature-x
git diff master...feature-x
will actually do git diff X Y
git diff master..feature-x
will actually do git diff Z Y
Both ...
and ..
will generate the same diff if feature-x contains the latest of master, like:
o-o-X master
\
-o-o-o-o-o-Y feature-x
or
o-o-X-o-o-o-o-Z master
\ \
-o-o-o-o-o-Y feature-x
Written by Kristian Lewis Jones
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
khasinski
591.1K
dmichaelavila
500.4K
Related Tags
#git
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#