To delete branch from git use the following command
git push -d <remote name> <branch name>
git branch -d <branch name>
Real example to delete branch from git
git push -d origin branch_name_to_delete
If you just want to learn the correct syntax of delete branches in Git you simply need to run following command:git branch -d <branch-name>
NOTE: if the branch has some unmerge changes then you can not delete branch using the above command to delete a branch with unmerged changes you only need to execute the following command.
git branch -D <branch-name>
Now you need to push deleted branch to remote repository, use the following commandgit push --all