Chetan
Chetan

Reputation: 1620

how to check all the commits of one branch is present in an another branch

I've have a branch called A, i've a set of commits merged to that branch from master and also i created a new branch called B.

Now i've to check all the commits merged to branch A is also present in the branch B.

Upvotes: 1

Views: 58

Answers (1)

CodeWizard
CodeWizard

Reputation: 142562

You simply need to verify if the branch was merged into the desired branch

git branch -a --merged origin/<branch_name>

This command will print out all the branches that are merged in to your current branch. You can user grep or any other filter to find out if your branch was merged or not or simply see it in the output.

For example: list all my branches that are merged into dev (fully merged)

enter image description here

Upvotes: 1

Related Questions