[cmake-developers] Good way to track whether a branch has been merged into master ?

Michael Wild themiwi at gmail.com
Sun Sep 19 05:15:09 EDT 2010


On 19. Sep, 2010, at 11:03 , Alexander Neundorf wrote:

> Hi,
> 
> I'm currently cleaning up my local CMake branches.
> What is a good way to find out whether some branch has been merged into 
> master ? Right now I was looking through "git log" to see whether the commits 
> are in master.
> 
> Alex

Many options come to mind:

1. just try to delete the branch with 'git branch -d <branch>'. Git will refuse to delete it if the branch hasn't been merged.
2. 'git merge-base <branch1> <branch2>' shows the last merge point, or if that doesn't exist the branching point.
3. 'git show-branch <branch1> <branch2>' shows the history of both branches since the last merge (that's the default, you can show more if you want).
4. 'git log <branch1>..<branch2>' shows all commits in <branch2> that are not in <branch1>.

HTH

Michael

--
There is always a well-known solution to every human problem -- neat, plausible, and wrong.
H. L. Mencken

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20100919/28b4b11a/attachment.sig>


More information about the cmake-developers mailing list