12

Cleaning up local git branches deleted on a remote

 4 years ago
source link: https://www.erikschierboom.com/2020/02/17/cleaning-up-local-git-branches-deleted-on-a-remote/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Introduction When using git, local branches can track remote branches that no longer exist (the remote branch is gone). To identify these branches, we first have to cleanup (prune) the remote's branches:$ git fetch -p From https://test.com - [deleted] (none) -> origin/disable-feature-x - [deleted] (none) -> origin/fix-typo - [deleted] (none) -> origin/grammar-fix In this case, three remote branches were deleted. Let's see if we have local branches that are tracking deleted branches:

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK