---
description: Smart backup of main branches with duplicate detection
---

1. List existing backup branches
// turbo
```bash
cd /Users/sd9235/code/mygh/learning_ai_peakpulse && git branch --list 'backup/*' | tail -5
```

2. Get current HEAD commit
// turbo
```bash
cd /Users/sd9235/code/mygh/learning_ai_peakpulse && git rev-parse --short HEAD
```

3. Create backup branch with timestamp (skip if HEAD hasn't changed since last backup)
// turbo
```bash
cd /Users/sd9235/code/mygh/learning_ai_peakpulse && git branch backup/main-$(date +%Y%m%d-%H%M%S)
```

4. Confirm backup created
// turbo
```bash
cd /Users/sd9235/code/mygh/learning_ai_peakpulse && git branch --list 'backup/*' | tail -3
```
