I'm following the git-flow model and I have a doubt.
First, I add a new feature branch from 'develop':
# Checkout from develop branch
$ git checkout -b <branch>
# Push and track <branch>
$ git push --set-upstream origin <branch>
# Switch to 'develop'
$ git checkout develop
# Merge <branch> into 'develop'
$ git merge --no-ff <branch>
# Remove <branch> locally
$ git branch -d <branch>
# Remove <branch> remotely <-- ???
$ git push origin develop
<branch> is only removed locally by virtue of
git branch -d <branch>, but a copy of it exists on remote (if it was pushed there prior). This can be verified by running
git branch -vvvv, which will show the remote branch with no associated local tracking branch.
git push origin develop will only push
develop to your remote repository (origin) without touching anything else (barring any commit hooks). If
<branch> did exist remotely and you wanted to delete it, you would have to add the deletion operation as a separate step (
git push origin :<branch>).