Let's say we have three named branches A, B and C. Is there a (non ocular) way to detect that changes from C has made it into A?
A ----------------------------
| \ /
B | \------------/
| /
C \---------/ -------
You can use the git merge-base command to find the latest common commit between the two branches. If that commit is the same as your branch head, then the branch has been completely merged.
When you perform a merge, you effectively merge one branch into another—typically a feature branch or bug fix branch into a main branch such as master or develop. Not only will the code changes get merged in, but also all the commits that went into the feature branch.
Step 3 − Check status of the merged and not merged branches from master using option --merged and --no-merged. The command and output are shown below. From the output it is clear that the branches bugfix and feature are to be merged to the master branch.
To see the beginning of the merge conflict in your file, search the file for the conflict marker <<<<<<< . When you open the file in your text editor, you'll see the changes from the HEAD or base branch after the line <<<<<<< HEAD .
Starting with Mercurial 1.6.0, you can use revsets to find this:
hg log -r "ancestors(A) and branch(C)"
This shows all the ancestors of A that are on the C branch. You can use templating to extract exactly the information you need from the log entries.
See hg help revsets
for full details.
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