DEV Community

Muhammad
Muhammad

Posted on

After merging a git branch to the main branch, how to delete it?

You have to do 2 steps: you have to delete it locally as well as from your Github or whatever your remote respository is. Run the following 2 commands to do so:

  1. git branch -d [branchname]
  2. git push origin --delete [branchname]

Top comments (0)