1

I'm using GitHub, when I git branch -a, it shows like this:

  master
* develop
  remotes/origin/HEAD
  remotes/origin/develop
  remotes/origin/master
  remotes/origin/feature001
  remotes/origin/feature002
  remotes/origin/feature003

I have deleted feature001~003 on GitHub.com, How can I delete them locally? I mean not show when I do git branch -a.

Sato
  • 8,192
  • 17
  • 60
  • 115

2 Answers2

2

Generally you should just run git fetch -p (or --prune, same meaning). However, there's a bug (being fixed) that sometimes requires running git remote --prune instead; see this question and answers.

(If necessary you can delete them manually by using git update-ref -d with the full name, or editing the underlying git repository files and directories.)

Community
  • 1
  • 1
torek
  • 448,244
  • 59
  • 642
  • 775
0

to delete local branch
git branch -d the_local_branch

check this link How do I delete a Git branch both locally and remotely?
or you can try pulling from remote and then merge to local repository.

Community
  • 1
  • 1
LearningC
  • 3,182
  • 1
  • 12
  • 19