In this lesson, you will learn how to automatically delete branches after merging pull requests on GitHub. If you prefer to learn by reading, you can read the accompanying blog post.
Joe Previte: From the GitHub repo page, head over to Settings. Scroll down until you see the Merge button section here. You'll see we have a box right here, Automatically delete head branches. Let's check that.
Now let's see it in action. We'll merge these pull requests, and you'll notice there is no prompt asking if we want to delete the branch. Let's verify that it's been deleted for us.
Heading back over to the main page, we'll click on branch and you will see that now we only have the master branch. That's because with this setting enabled, all head branches will be deleted after they're merged in through a pull request. That's it.