Accidentally created branch with name origin/master

In a fit of unbelievable stupidity I accidentally ran

git checkout -b origin/master

  • Merge Unity 3D scene with Git
  • Magento upgrading with Git
  • Tortoise Git, undo create repo here
  • Is there any way to revert the current build in Jenkins?
  • Can I sign a git tag after it was created?
  • Why tags should never be removed from server?
  • And now have a branch named origin/master which ruins everything. Is it safe to just run

    git -D origin/master?

    I tried looking in the config for the branch but its not defined there. Yet when I run git branch I see it.


  • Re-doing a reverted merge in Git
  • How to perform a rebase onto a specific commit?
  • Automatically skip empty commits when using git rebase
  • How to create a file inside a repository using PyGithub?
  • Git remove root commit
  • Show trailing whitespace and line endings in removed lines in diff output
  • One Solution collect form web for “Accidentally created branch with name origin/master”

    git branch -D origin/master will delete your local origin/master branch.

    This will not delete your origin‘s (remote) master branch. Deleting your remote branches would be either:

    (git 1.7.0)

    git push origin --delete branch


    git push origin :branch

    Git Baby is a git and github fan, let's start git clone.