Join egghead, unlock knowledge.

Want more egghead?

This lesson is for members. Join us? Get access to all 3,000+ tutorials + a community with expert developers around the world.

Unlock This Lesson
1×
Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.

Autoplay

    Cleanup and Delete Branches After a Pull Request

    gitgit

    We've made a pull request and now we can clean up the branches by deleting the feature branch.

    Branches are just pointers to commits - so we can safely delete branches without losing the underlying commits (once the commits are merged back into master).

    So we'll use the github interface to delete the branch remotely, and to delete it locally we'll use git remote prune origin --dry-run and then git remote prune origin

    That will tell us that the remote is gone, and we can finally clean up the feature branch with: git branch -d feature-branch