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

Muhammad - Jun 21 - - Dev Community

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]
. . . . . . . . . . . . . . . . . . .