How to clear the git branch list

Table of Contents

There is a case, we create a remote branch named “test”, and we delete it after we recognize it un-useful. But we take a look at our branch list ( through “git branch -a” ), the branch name has already shown in the list, which has been deleted before.

That will be mislead us, we need to clear the branch list. So there is a command:”git remote prune origin“, the “origin” is our repository name.

After all, the world has been cleaned. :D have a fun~