git branch -d only deletes the branch on your machine. The copy on the server stays until you delete it there too.
git push origin --delete feature/login
Git asks the remote to delete the branch and confirms with - [deleted] feature/login. You can list several branches in one command. There’s an older syntax that does the same thing, with a colon in front of the name:
git push origin :feature/login
It reads as “push nothing to this branch”. I prefer --delete because nobody has to guess what the colon means.
For the local side, git branch -d feature/login deletes the branch only when it’s merged, and refuses with error: the branch is not fully merged otherwise. -D deletes it anyway.
Other people’s clones keep their origin/feature/login until they fetch with --prune, so the branch can seem to come back in their branch list for a while.
Deleting a remote branch is easy to undo only if someone still has the commits. If the branch held work that wasn’t merged anywhere and nobody else has a copy, it’s gone from the server. Many hosts protect the default branch and release branches against this, but your feature branches usually have no such protection. Run git log origin/main..origin/feature/login first if you’re unsure.
Further reading: git-push documentation