Reputation: 4745
I have a local branch and create a pull request, but I do not know if it is accepted and merged, and which remote branch it is merged into.
How can I know that?
I know through gitk or SourceTree we might see the result.
But how to achieve it by command line?
Upvotes: 0
Views: 31
Reputation: 30858
Suppose the local branch is foo
.
git fetch
git branch -r --contains foo
git fetch
updates the tracking branches like origin/foo
.
git branch -r --contains foo
lists all the tracking branches (-r
) that have merged foo
(--contains foo
).
If a tracking branch origin/bar
is in the output, then we know the branch bar
in the remote repository has merged foo
.
Upvotes: 1