Join the Stack Overflow Community
Stack Overflow is a community of 6.4 million programmers, just like you, helping each other.
Join them; it only takes a minute:
Sign up

This question already has an answer here:

Ok, I've created an origin/origin/master branch and I've pushed it. I'm scared to do some remove operations. Whan can I do? Is it safe to run a remove operation?

share|improve this question

marked as duplicate by Flimzy, easwee, legoscia, random, Rob Watts May 22 '14 at 17:35

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 6 down vote accepted

Don't worry, you can always go back with git. Make sure you have your master branch locally, then try this one:

git push origin :origin/master

It will delete origin/master branch on a remote "origin".

If you want to be supersafe, rename your remote from "origin" to "temp", then do:

git push temp :origin/master

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.