0
点赞
收藏
分享

微信扫一扫

Clean Local Git Repository

得一道人 2022-04-29 阅读 62
git

Clean Local Git Repository

Keeping your local repository clean is helpful to development work.

1. Clean Rubbish

$ git gc
$ git prune

2. Clean the branches that are no longer in the remote repository

$ git remote prune origin

3. Clean the tags that are no longer in the remote repository

$ git fetch origin --prune --prune-tags --force

or

$ git tag -d $(git tag)
$ git fetch --tags

Ref:

  • Remove local git tags that are no longer on the remote repository
举报

相关推荐

0 条评论