# Quick Start: Git Automatic Backup

## 🚀 How to Use

### Build with Automatic Backup
```bash
./build-with-backup.sh
```

This automatically:
- ✅ Commits all your changes
- ✅ Creates a build tag (e.g., `build-v1-20240112-080612`)
- ✅ Builds backend and frontend
- ✅ Saves build information

### List All Builds
```bash
./list-builds.sh
```

### Restore to a Previous Build
```bash
./restore-build.sh build-v1-20240112-080612
```

## 📋 Example Workflow

```bash
# 1. Make code changes
# ... edit your files ...

# 2. Build with backup (automatically commits & tags)
./build-with-backup.sh

# 3. If something breaks, restore
./list-builds.sh                    # See all builds
./restore-build.sh build-v5-...      # Restore to specific build
```

## ⚠️ Important Notes

- **Always use `./build-with-backup.sh`** instead of manual builds
- Each build gets a unique tag: `build-v<number>-<date>-<time>`
- You can restore to any build tag anytime
- Build tags are never deleted automatically

## 🔧 Troubleshooting

**Permission denied?**
```bash
chmod +x build-with-backup.sh restore-build.sh list-builds.sh
```

**No builds found?**
```bash
./build-with-backup.sh  # Create your first build
```

**Can't restore?**
```bash
./list-builds.sh  # Check available builds
git status        # Check for uncommitted changes
```
