Skip to content

CMCC Remove Old Branches

Steve Goldhaber edited this page Jan 15, 2023 · 1 revision

How to remove old or unused branches

Once your modifications have been merged into the CMCC-Foundation repository, you may have no more use for the local fork branch created to develop those modifications. In that case, you can remove the branch both from your local cloned repo and your GitHub fork:

  1. First, make sure your local repo isn't checking out the old branch, by simply checking out a different branch:
    git checkout <some_other_branch>
  1. Then, remove branch from local repo:
    git branch -d <branch_name>
  1. Finally, remove branch from personal fork repo:
    git push --delete <origin> <branch_name>

You can also remove the branch via GitHub's user interface.