I’m working on a open source project where a sequence of events might look like:
- Create branch feature-1, code away, push feature-1 to my GitHub, issue a pull-request
- Repeat for feature-2, feature-3, etc.
- Weeks pass and I regularly pull project/master into my local master
- I see feature-1 turn up as a merge, then feature-3, but not feature-2
Is there a convenient way for me to see which local branches have been merged into master?
That is, which of my features have made it through the review process and been accepted, and which haven’t?
It turns out to be very easy. The command
git branch --mergeddoes exactly that:That lists every branch which has been merged into master. If they’re feature branches, I guess you can delete them at that point.
And:
which lists every branch which hasn’t.