Deleting a Branch

The Delete Branch option allows you to remove branches that are no longer needed, helping keep the codebase clean and organized.

Branches can be deleted when they are outdated, merged, or no longer required. This action is irreversible and should be performed with caution to avoid losing important work.

Steps to Delete a Branch

  1. Navigate to the Code tab and locate the branch you want to delete.

  2. Click the three-dot menu (⋮) next to the branch name.

  3. Select Delete from the dropdown options.

  4. A confirmation dialog will appear asking: “Are you sure you want to delete this branch?”

  5. Click Yes to confirm deletion, or No to cancel.

Important Notes

  • You cannot delete the main branch - default branch.

  • Ensure all critical changes are merged before deleting a branch.

  • Once deleted, the branch cannot be recovered unless recreated manually.

Use Case

  • After merging: Delete feature branches once merged into main or release to keep the repository clean.

  • Old/stale branches: Remove branches that haven’t been updated or used for a long time.

  • Clean workspace: Prevent confusion by removing duplicate or unused branches.

Last updated

Was this helpful?