Branches
How Lighthouse tracks branches, and how to archive, restore, or delete them.
Lighthouse tracks each branch separately. A branch has its own security cards, scans, and enhancements. It appears in Lighthouse the first time something happens on it, such as an ingestion, a scan, or an enhancement.
Every repository has a default branch, usually main. Lighthouse uses it when a branch has no cards of its own.
Archived branches
Archiving hides a branch from branch lists and keeps its history. By default, a pull request's branch is archived when the pull request is merged or closed.
An archived branch comes back on its own when there's new activity on it: an ingestion, an enhancement, or a pull request scan. A pre-commit scan doesn't bring it back. You can also restore it yourself.
Manage branches
Open the repository and go to the Branches tab.
| Action | Use it to |
|---|---|
| Search, Archived filter | Find a branch, including archived ones. |
| Select stale | Select branches idle for a number of days, or missing on GitHub. |
| Archive | Hide the selected branches and keep their history. |
| Restore | Bring archived branches back. |
| Delete | Remove the selected branches and their history from Lighthouse. |
Tags on each branch show its state: Default, Archived, Not on GitHub, or Running.
Deleting is permanent
A deleted branch's history is gone. If the branch is used again, it starts with no history. Archive instead unless you're sure.