R
R
roger52016-02-21 10:48:15
git
roger5, 2016-02-21 10:48:15

How to get diff between branch start and branch HEAD in Git?

Dear experts!
Tell me, is it possible to get a diff between the start of the "my_branch" branch (since it was inherited from another branch) and the current version of the "my_branch" branch?
It is desirable that the syntax is tied to "my_branch" only.
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
toxa82, 2016-02-21
@toxa82

Tie only to "my_branch" will not work, you can only see the difference relative to another branch.
git log master..my_branch::: All commits reachable from my_branch that are not reachable from master
git log master...my_branch::: Shows the difference of commits between branches (commits that are on one branch but not on the other)
--left-right ::: shows which side of the range each is on commit
git diff master..my_branch::: Will show you the differences from the current state of the master branch.
git diff master...my_branch::: Shows you only the work in your current topic branch that has been contributed since it branched from the master branch.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question