4

After merging a development branch devBranchA into the master, I deleted it on the web interface (precisely, on gitlab.com). If I then do a git branch -r to list all remote branches, I get that:

origin/HEAD -> origin/master
origin/devBranchA

Why is that so? I already tried a git pull, but it did not shown any difference.

Ernte1893
  • 117
  • 9
  • Possible duplicate of [cleaning up old remote git branches](https://stackoverflow.com/questions/3184555/cleaning-up-old-remote-git-branches) – phd Sep 14 '18 at 14:14
  • https://stackoverflow.com/search?q=%5Bgit%5D+remove+local+and+remote+branches – phd Sep 14 '18 at 14:14

1 Answers1

4

Use git remote prune origin to remove the deleted remote branches from your local repo.

Use git branch -d <branch-name> to delete the local branch.

S.K.
  • 3,337
  • 2
  • 13
  • 27