I want to delete a local branch and in my remote project in GitHub.
I want to delete a local branch and in my remote project in GitHub.
To delete the branch locally:
git branch -D <nome do branch>
To delete the branch remotely:
git push <nome do origin> <nome do branch> --delete
To remove local branch:
git branch -d nome-do-branch
And to remove remote branch add the "-r" flag:
git branch -dr origin/nome-do-branch
git push origin: bin_name
Juarez Lustosa's response for some reason has been denied and he still has a comment saying that "he wants to delete a branch, not to upload his commits."
But it is a valid answer, used to exclude remote branchs, and simpler than the others cited.
If you have not noticed before nome_do_branch
has two points ( :
) and this is what deletes the branch and does not push.
git push origin: bin_name