Tag Archives: git_remove

Git: create and delete branches remotely

To create a remote branch:

$ git checkout -b <branch-name>
$ git push -u origin <branch-name>

To delete a remote branch:

$ git push origin --delete <branch-name>
$ git branch -d <branch-name> # delete the local branch

If there are unmerged changes which you are confident of deleting of your local branch:

$ git branch -D <branch-name>

And that is all.