I have a branch which has merged master to it couple of times (to get the newest bug fixes to that feature branch). Now I wanted to see all the changes I have made after I started working in that branch so I tried git diff start_commit..HEAD
. However I noticed that git also displayed those merged commits so that was not what I wanted.
Then I tried to create a pull request from that branch to see if same applies to GitHub's pull request, but noticed that pull request was only displaying my changes which was what I wanted.
Branches looks like this
master: A---B---C---D---E---F
\ \ \
feature: G---H---I---J---K---L
And the problem is that git diff A..L is displaying all commits from A-L, but GitHub's pull request is only displaying G-L which is what I want.
So what command (or commands) GitHub is using to form a pull request?
Edit: Added a picture
Check this out. From git documentation:
Comparing branches
$ git diff topic master <1>
$ git diff topic..master <2>
$ git diff topic...master <3>
1. Changes between the tips of the topic and the master branches.
2. Same as above.
3. Changes that occurred on the master branch since when the topic branch was started off it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With