How to check that branch is already merged #951
-
I would like to get list of branches that already merged like I tried to workaround with |
Beta Was this translation helpful? Give feedback.
Answered by
pjbgf
Nov 30, 2023
Replies: 1 comment 2 replies
-
The main problem is that I don't fully understand the internals of git. I think I can find some way, but I want to understand the true way. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For
--merged
, I believe you would get the tip commit of your branches, then iterate through the commits of your current branch to confirm whether they can be found there.For getting tip commits from the branches you could use something like this:
For iterating through the commits from the current branch, you could use
r.Log
: