Undo Git Track Command

I was trying to track a remote branch and ended up doing the following:

$ git branch --track origin/branch1
Branch origin/branch1 set up to track local branch branch1.

Which is obviously not what I intended to do. How would I undo this setting? I tried rectifying it myself:

  • git: rename local branch failed
  • git: branching removed some commits
  • Subversion: Can I checkout, modify, and then make it a branch?
  • Difference between `git branch -f <branch_name> <hash>` and `git checkout <branch_name>; git reset --hard <hash>` under a clean working tree?
  • How to find out who delete a branch at git?
  • What does this do: git branch -f
  • $ git branch --track origin branch1
    error: there are still refs under 'refs/heads/origin'
    fatal: Failed to lock ref for update: Is a directory
    $ git branch --track branch1 origin/branch1
    fatal: A branch named 'branch1' already exists.
    $ git branch --no-track origin/branch1
    fatal: A branch named 'origin/branch1' already exists.
    

    …to no avail. Thanks in advance!

  • git submodule add fatal: Not a Git Repository
  • Remove large commits from git
  • git: fatal: Cannot switch branch to a non-commit '12382'
  • git/github: Remove from history (but not from HEAD) some large binary files
  • What are the differences between 'revert', 'amend,' 'rollback', and 'undo' a commit?
  • Git: Merge in only one commit
  • One Solution collect form web for “Undo Git Track Command”

    Just delete the branch.

    git branch -d origin/branch1
    
    Git Baby is a git and github fan, let's start git clone.