Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more
Post Closed as "Duplicate" by CommunityBot
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

I created a branch notmaster to commit as well as push some changes. When I was finished with that branch, I merged the changes back into master, pushed them out, and then deleted the local notmaster.

$ git branch -a
* master
  remotes/origin/master
  remotes/origin/notmaster

Is there anyway to delete the remote notmaster?


A little more clarity, with the solution from Ionutsolution from Ionut:

The usual method failed for me:

$ git push origin :notmaster
error: dst refspec notmaster matches more than one.

That's because I had a tag with the same name as the branch. This was a poor choice on my behalf and caused the ambiguity. So in that case:

$ git push origin :refs/heads/notmaster

I created a branch notmaster to commit as well as push some changes. When I was finished with that branch, I merged the changes back into master, pushed them out, and then deleted the local notmaster.

$ git branch -a
* master
  remotes/origin/master
  remotes/origin/notmaster

Is there anyway to delete the remote notmaster?


A little more clarity, with the solution from Ionut:

The usual method failed for me:

$ git push origin :notmaster
error: dst refspec notmaster matches more than one.

That's because I had a tag with the same name as the branch. This was a poor choice on my behalf and caused the ambiguity. So in that case:

$ git push origin :refs/heads/notmaster

I created a branch notmaster to commit as well as push some changes. When I was finished with that branch, I merged the changes back into master, pushed them out, and then deleted the local notmaster.

$ git branch -a
* master
  remotes/origin/master
  remotes/origin/notmaster

Is there anyway to delete the remote notmaster?


A little more clarity, with the solution from Ionut:

The usual method failed for me:

$ git push origin :notmaster
error: dst refspec notmaster matches more than one.

That's because I had a tag with the same name as the branch. This was a poor choice on my behalf and caused the ambiguity. So in that case:

$ git push origin :refs/heads/notmaster
Minor corrections
Source Link
chrisaycock
  • 37.2k
  • 14
  • 90
  • 127

How do I delete a remote branch in Git?

I created a branch notmaster to commit as well as push some changes. When I was finished with that branch, I merged the changes back into master, pushed them out, and then deleted the local notmaster.

$ git branch -a
* master
  remotes/origin/master
  remotes/origin/notmaster

Is there anyway to delete the remote notmaster?


A little more clarity, with the solution from Ionutsolution from Ionut:

The usual method failed for me:

$ git push origin :notmaster
error: dst refspec notmaster matches more than one.

That's because I had a tag with the same name as the branch. This was a poor choice on my behalf and caused the ambiguity. So in that case:

$ git push origin :refs/heads/notmaster

How do I delete remote branch in Git?

I created a branch notmaster to commit as well as push some changes. When I was finished with that branch, I merged the changes back into master, pushed them out, and then deleted the local notmaster.

$ git branch -a
* master
  remotes/origin/master
  remotes/origin/notmaster

Is there anyway to delete the remote notmaster?


A little more clarity, with the solution from Ionut:

The usual method failed for me:

$ git push origin :notmaster
error: dst refspec notmaster matches more than one.

That's because I had a tag with the same name as the branch. This was a poor choice on my behalf and caused the ambiguity. So in that case:

$ git push origin :refs/heads/notmaster

How do I delete a remote branch in Git?

I created a branch notmaster to commit as well as push some changes. When I was finished with that branch, I merged the changes back into master, pushed them out, and then deleted the local notmaster.

$ git branch -a
* master
  remotes/origin/master
  remotes/origin/notmaster

Is there anyway to delete the remote notmaster?


A little more clarity, with the solution from Ionut:

The usual method failed for me:

$ git push origin :notmaster
error: dst refspec notmaster matches more than one.

That's because I had a tag with the same name as the branch. This was a poor choice on my behalf and caused the ambiguity. So in that case:

$ git push origin :refs/heads/notmaster
Ambiguity
Source Link
chrisaycock
  • 37.2k
  • 14
  • 90
  • 127

I created a branch notmaster to commit as well as push some changes. When I was finished with that branch, I merged the changes back into master, pushed them out, and then deleted the local notmaster.

$ git branch -a
* master
  remotes/origin/master
  remotes/origin/notmaster

Is there anyway to delete the remote notmaster?


A little more clarity, with the solution from Ionut:

The usual method failed for me:

$ git push origin :notmaster
error: dst refspec notmaster matches more than one.

That's because I had a tag with the same name as the branch. This was a poor choice on my behalf and caused the ambiguity. So in that case:

$ git push origin :refs/heads/notmaster

I created a branch notmaster to commit as well as push some changes. When I was finished with that branch, I merged the changes back into master, pushed them out, and then deleted the local notmaster.

$ git branch -a
* master
  remotes/origin/master
  remotes/origin/notmaster

Is there anyway to delete the remote notmaster?

I created a branch notmaster to commit as well as push some changes. When I was finished with that branch, I merged the changes back into master, pushed them out, and then deleted the local notmaster.

$ git branch -a
* master
  remotes/origin/master
  remotes/origin/notmaster

Is there anyway to delete the remote notmaster?


A little more clarity, with the solution from Ionut:

The usual method failed for me:

$ git push origin :notmaster
error: dst refspec notmaster matches more than one.

That's because I had a tag with the same name as the branch. This was a poor choice on my behalf and caused the ambiguity. So in that case:

$ git push origin :refs/heads/notmaster
Source Link
chrisaycock
  • 37.2k
  • 14
  • 90
  • 127
Loading