matt
matt

Reputation: 749

Unidentified branch on remote repository

There is an extra branch my-app/master in my remote repository and I don't know how it got there. Doing a git fetch doesn't add the branch to my local repository. Can I find out how it got there and get rid of it?

> git branch -r
   my-app/master
   origin/HEAD -> origin/master
   origin/master
   origin/release-0.1
   origin/feature-a

local: git branch

  master
* release-0.1
  feature-a

Upvotes: 0

Views: 47

Answers (1)

Matt Ke
Matt Ke

Reputation: 3739

my-app/master isn't a branch. It's a combination of remote repository and branch. Besides the default remote repository, you have a remote repository with alias my-app which has a branch with the name master.

(origin is usually the alias for the default remote repository.)

You can see where they point to with:

git remote -v

(However, there is no command which allows you to find out how it got there. If it was added via the terminal/command-line you could look in the terminal/command-line history.)

You can delete a alias for a remote repository with:

git remote remove <name>

Upvotes: 1

Related Questions