0

I have cloned a remote GitHub repository to my computer, and it all went well. I worked on some branches, and wanted to see all of them, so I typed:

git branch -a

And it showed this:

* master
  remotes/origin/cleanup
  remotes/origin/master
  remotes/origin/test

I have previously created the 'cleanup' and 'test' branches, merged them, deleted them on the local side, and the remote side, and yet they are showing in this weird 'file-directory like' fashion. Is this normal?

Sorry if this is a bad question. I am new to Git and Github.

Merricj2
  • 43
  • 1
  • 3

1 Answers1

6

You need to fetch with --prune so that deleted remote branches disappear on the local repo (no messing with local branches, even if one local branch was created from one of those deleted remote branches).

git fetch --prune -a
eftshift0
  • 26,375
  • 3
  • 36
  • 60