DEV Community

RR Joson
RR Joson

Posted on

Keep your repository clean by automatically deleting GitHub branches

Have you ever found your GitHub repo having too many branches? Was it because you and your teammates keep forgetting to delete a branch after it gets merged?

You can fix this in 3 easy steps:

  1. On GitHub, navigate to the main page of the repository.
  2. Under your repository name, click "Settings".
  3. Under "Merge button", select or unselect "Automatically delete head branches"

Now, the next time you merge a branch, it will get automatically deleted. Keeping your repository from having too many branches.

Thanks for reading. Did this help you out? If it did, I hope you consider sharing it. You might help someone else out. Thanks so much!

Reference: https://help.github.com/en/articles/managing-the-automatic-deletion-of-branches

Top comments (0)