GIT-009 recommended branch-strategy

Stale branch audit

Branches with no push for 30-45 days are reviewed and cleaned up

Question to ask

"Any branches untouched for 45+ days nobody's talking about?"

Verification guide

Severity: Recommended

Check for branches with no recent activity:

# List remote branches with last commit date
for branch in $(git branch -r | grep -v HEAD | grep -v main | grep -v staging); do
  echo "$(git log -1 --format='%ci' $branch) $branch"
done | sort

Flag branches:

  • No commits in 30+ days: review recommended
  • No commits in 45+ days: likely should be deleted

Pass criteria:

  • No branches older than 45 days without activity, OR
  • User confirms regular review process exists

Fail criteria:

  • Multiple branches with no activity for 45+ days
  • No process for reviewing stale branches

Evidence to capture:

  • List of branches with last commit date
  • Count of stale branches (30+ days, 45+ days)
  • Any justification for keeping old branches

Section

01. Git Repo Setup & Security

Infrastructure & Setup