git removing a development branch from remote git server

I created a branch, worked on it, merged it with the base branch and now want to delete it. The branch was created on the git remote server as well.

Now when I ran git branch -d branch, it removed it and I pushed it. But i still see the branch on the git remote server.

  • Git Gui doesn't ignore lines starting with a hashmark (#) in the commit message
  • Git: rebase merge commit
  • repo: manifest.xml: What does the fetch=“..” mean?
  • How do I find the most recent git commit that modified a file?
  • Team Foundation Server 2015 (tfs2015) run git gc --prune=now on orgin/remote
  • How to solve git conflicts by having only the conflict files?
  • I saw a similar issue earlier when I created this branch and I was not able to see it on the remote git server.

    I am even able to checkout from this branch.

    Am I missing anything here?

  • Can't manage to load my private key with git extension
  • Is it possible to delete a particular Commit from Git Branch(Local and Remote)?
  • How can I make WinMerge my git mergetool?
  • How do I prevent .git directory from getting copied to bin directory during rebuild?
  • Git, Hg or Bzr — Which to recommend to a new user?
  • how to set visible .gitignore in IDE Aptana Studio?
  • 3 Solutions collect form web for “git removing a development branch from remote git server”

    To remove branch on the remote

    git push remote :refs/heads/development

    To expand on these answers, each branch basically exists in three places:

    • On the remote server, e.g. origin/foo
    • Your local copy of origin/foo (which is updated via git fetch)
    • The local branch foo (which is updated via git merge origin/foo following git fetch – or more commonly, both are done together via git pull).

    git branch -d deletes the last of these three, namely the local branch. git branch -d -r will remove your copy of the remote branch (or you can run git remote prune origin after deleting local branches).

    To delete the branch on the remote server though, you must use git push. The old syntax for this is git push origin :branchname. This is because the syntax is localref:remoteref, for example it is possible to push a local branch on your machine to a remote branch with a different name, e.g. git push origin localbranch:remotebranch. If you leave the localbranch part empty, you’re telling git to push nothing to the remote branch, deleting it.

    If that’s confusing, don’t worry, the git developers agree with you. Newer versions have a --delete option so git push origin --delete branchname does the same thing as git push origin :branchname, but its intent is much more clear.

    You delete the remote branch with the following arcane command:

    git push origin :newfeature

    You may want to update your index, so the tracking branch gets removed as well:

    git fetch origin --prune
    Git Baby is a git and github fan, let's start git clone.