Git removing a development branch from a remote git server

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

Now that I have run the branch of the git -d branch, he deleted it and I clicked it. But I still see the branch on the remote git server.

I saw a similar problem earlier when I created this thread and I could not see it on the remote git server.

I can even check from this thread.

Am I missing something?

+5
source share
3 answers

To delete a branch on the remote

git push remote :refs/heads/development
+7
source

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

  • On a remote server, for example. origin/foo
  • origin/foo ( git fetch)
  • foo ( git merge origin/foo git fetch - , git pull).

git branch -d , . git branch -d -r ( git remote prune origin ).

, git push. - git push origin :branchname. , localref:remoteref, , , . git push origin localbranch:remotebranch. localbranch , git , .

, , git . --delete, git push origin --delete branchname , git push origin :branchname, .

+9

You delete the remote branch with the following secret command:

git push origin :newfeature

You can update your index, so the tracking branch will also be deleted:

git fetch origin --prune
+3
source

All Articles