Skip to content

Instantly share code, notes, and snippets.

@zxhfighter
Created August 1, 2018 04:35
Show Gist options
  • Save zxhfighter/ac489b94ca9a9dae1d7d4799d74d200e to your computer and use it in GitHub Desktop.
Save zxhfighter/ac489b94ca9a9dae1d7d4799d74d200e to your computer and use it in GitHub Desktop.
git remote prune

清理本地无用分支

有时候远程分支删除后,在本地还留有分支,可以使用:

git remote prune origin --dry-run

查看。

确定没问题后,可以使用:

git remote prune origin

删除本地无效分支,保持和远端分支一致。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment