Congrats on reaching the end of week one!
It’s Friday, so let’s end with a quick win:
git branch -r. Marvel at all the old tracking branches that have been left in your local repo.
git remote prune originto delete the local tracking branches that don’t exist on
originanymore. You might want to throw a
--dry-runon there to confirm that git is going to do the right thing.
git branch -r. Better, right?
- Now that your local repo is clean, take a look at the branches on
git ls-remote --heads origin.
- Delete any of your branches that are no longer needed with
git push origin --delete old_branch.
- Maybe bug your coworkers to do 4 and 5, too.
- Enjoy the weekend!