Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
156 changes: 156 additions & 0 deletions PLAN-git-history-cleanup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
# Git History Cleanup Plan

## Current State

- `.git` size: **119 MB**
- Total blobs in history: 129 MB across 1,777 files
- Large files (>500KB): 72 files totaling **97 MB**

### Breakdown by Category

| Category | Files | Size | Status |
|----------|-------|------|--------|
| `src/data/common-slides/` | 20 | 25 MB | Deleted from repo |
| `public/images/swag/*.png/*.jpg` | 15 | 24 MB | Deleted (kept WebP only) |
| `src/assets/images/` | 28 | 39 MB | Optimized (old versions) |
| `public/images/` (other) | 24 | 33 MB | Optimized/deleted |

---

## Tiered Approach

### Tier 1: Analysis Only (Safe)
**Risk: None** | **Savings: 0**

- [x] Analyze git history for large blobs
- [x] Categorize files by directory/type
- [x] Document current state
- [ ] Install `git-filter-repo` if not present
- [ ] Create backup of repo before any changes

### Tier 2: Remove Deleted Directories
**Risk: Low** | **Estimated Savings: ~25 MB**

Remove files from directories that no longer exist in the repo:
```
src/data/common-slides/ # 20 files, 25 MB
src/data/no-solutions-transcripts/ # if present
```

**Command:**
```bash
git filter-repo --path src/data/common-slides/ --invert-paths
git filter-repo --path src/data/no-solutions-transcripts/ --invert-paths
```

### Tier 3: Remove Old Swag Formats
**Risk: Low-Medium** | **Estimated Savings: ~24 MB**

Remove PNG/JPG versions of swag images (WebP versions retained):
```
public/images/swag/*.png
public/images/swag/*.jpg
```

**Command:**
```bash
git filter-repo --path-glob 'public/images/swag/*.png' --invert-paths
git filter-repo --path-glob 'public/images/swag/*.jpg' --invert-paths
```

### Tier 4: Remove Old Image Versions
**Risk: Medium** | **Estimated Savings: ~50-70 MB**

Remove historical versions of images we optimized:
- Old `flowers.jpg` (4.9 MB → 571 KB)
- Old `tenex-logo.png` (1.8 MB → 69 KB WebP)
- Old avatars, etc.

**Approach:** Use `--strip-blobs-bigger-than 1M` or targeted path removal

**Command (aggressive):**
```bash
git filter-repo --strip-blobs-bigger-than 500K
```

**Command (targeted):**
```bash
# List of specific files to remove old versions
git filter-repo --path public/images/showcase/tenex-logo.png --invert-paths
git filter-repo --path public/images/tim-bouma-avatar.png --invert-paths
# ... etc
```

---

## Execution Plan

### Prerequisites
```bash
# Install git-filter-repo
pip install git-filter-repo
# OR
sudo apt install git-filter-repo

# Create full backup
cd ..
cp -r website website-backup-$(date +%Y%m%d)
```

### Execution Order
1. Create dedicated branch for tracking (documentation only)
2. Execute Tier 2 (deleted directories)
3. Verify repo integrity: `git fsck && bun build`
4. Execute Tier 3 (old swag formats)
5. Verify again
6. Execute Tier 4 (old image versions) - optional
7. Final verification
8. Force push to remote
9. All collaborators must re-clone

### Post-Cleanup
```bash
# Verify new size
du -sh .git

# Run garbage collection
git gc --aggressive --prune=now

# Force push (DESTRUCTIVE - coordinates with team first!)
git push --force --all
git push --force --tags
```

---

## Warnings

⚠️ **Force push required** - All collaborators must re-clone after cleanup

⚠️ **Backup first** - Create full backup before any filter-repo commands

⚠️ **One-way operation** - History rewriting cannot be undone easily

⚠️ **PR/Issues** - Open PRs will be invalidated by history rewrite

---

## Expected Results

| Tier | Cumulative .git Size | Reduction |
|------|---------------------|-----------|
| Current | 119 MB | - |
| After Tier 2 | ~95 MB | ~24 MB |
| After Tier 3 | ~70 MB | ~49 MB |
| After Tier 4 | ~40-50 MB | ~70-80 MB |

---

## Rollback

If something goes wrong:
```bash
# Restore from backup
rm -rf website
cp -r website-backup-YYYYMMDD website
```
Binary file removed public/images/SEC-07-smp.png
Binary file not shown.
Binary file added public/images/SEC-07-smp.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/images/arjen-avatar.jpg
Binary file not shown.
Binary file added public/images/arjen-avatar.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/images/athens.png
Binary file not shown.
Binary file removed public/images/banner-monochrome.xcf
Binary file not shown.
Binary file removed public/images/banner.xcf
Binary file not shown.
Binary file removed public/images/boat1.png
Binary file not shown.
Binary file removed public/images/boat2.png
Binary file not shown.
Binary file removed public/images/funchal.jpg
Binary file not shown.
Binary file removed public/images/ice.png
Binary file not shown.
Binary file removed public/images/map.png
Binary file not shown.
Binary file removed public/images/men-wanted.png
Binary file not shown.
Binary file removed public/images/revealed-on-walk.jpg
Binary file not shown.
Binary file removed public/images/showcase/tenex-logo.png
Binary file not shown.
Binary file added public/images/showcase/tenex-logo.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/images/smooth-sea.jpg
Binary file not shown.
Binary file removed public/images/swag/SEC01_Shirt.jpg
Binary file not shown.
Binary file removed public/images/swag/SEC01_Shirt2.jpg
Binary file not shown.
Binary file removed public/images/swag/SEC01_Shirt3.jpg
Binary file not shown.
Binary file removed public/images/swag/SEC02_Hat.png
Binary file not shown.
Binary file removed public/images/swag/SEC02_Hat2.png
Binary file not shown.
Binary file removed public/images/swag/SEC02_Hat3.png
Binary file not shown.
Binary file removed public/images/swag/SEC03_Back.png
Binary file not shown.
Binary file removed public/images/swag/SEC03_Front.png
Binary file not shown.
Binary file removed public/images/swag/SEC04_Back.png
Binary file not shown.
Binary file removed public/images/swag/SEC04_Front.png
Binary file not shown.
Binary file removed public/images/swag/SEC05_Back.png
Diff not rendered.
Binary file removed public/images/swag/SEC05_Front.png
Diff not rendered.
Binary file removed public/images/swag/black-hat.png
Diff not rendered.
Binary file removed public/images/tim-bouma-avatar.png
Diff not rendered.
Binary file added public/images/tim-bouma-avatar.webp
Binary file modified src/assets/images/bell-labs.jpeg
Binary file modified src/assets/images/cypherpunks-write-code.jpeg
Binary file modified src/assets/images/endurance.jpeg
Binary file modified src/assets/images/flowers.jpg
Binary file modified src/assets/images/map.png
Binary file modified src/assets/images/open-source-everything.jpg
Binary file modified src/assets/images/pirate-ship-2.jpeg
Binary file modified src/assets/images/pirate-ship.jpeg
Binary file modified src/assets/images/school-of-athens.jpeg
Binary file modified src/assets/images/show-talk-build-loop.jpeg
Binary file modified src/assets/images/solvitur-ambulando.jpeg
Binary file modified src/assets/images/soveng-shirt.jpeg
Binary file modified src/assets/images/stay-weird.jpg
Binary file modified src/assets/images/walk-to-top.jpg
Binary file modified src/assets/images/walking.jpeg
Binary file modified src/assets/images/wide-open-sea.jpeg
Binary file modified src/assets/images/www-life-path.png
2 changes: 1 addition & 1 deletion src/config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

"metadata": {
"meta_author": "Sovereign Engineering",
"meta_image": "/images/SEC-07-smp.png",
"meta_image": "/images/SEC-07-smp.webp",
"meta_description": "The program that brought you Blossom, Nutzaps, Wikifreedia, Nsite, TollGate, Zapstore, and more..."
}
}
4 changes: 2 additions & 2 deletions src/content/sections/testimonial.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ testimonials:

- name: 'Tim Bouma'
designation: 'Safebox'
avatar: '/images/tim-bouma-avatar.png'
avatar: '/images/tim-bouma-avatar.webp'
npub: 'npub1q6mcr8tlr3l4gus3sfnw6772s7zae6hqncmw5wj27ejud5wcxf7q0nx7d5'
noteid: 'nevent1qqsgfy2hscuw4lufwz7djfkql3yccvs7ypkh30gzh95nmmslcs3ednqpp4mhxue69uhhyetvv9ujuerpd46hxtnfdupzpwa4mkswz4t8j70s2s6q00wzqv7k7zamxrmj2y4fs88aktcfuf68akcsrw'
content: "Don't miss the opportunity of a lifetime."

- name: 'Arjen'
designation: 'Tollgate'
avatar: '/images/arjen-avatar.jpg'
avatar: '/images/arjen-avatar.webp'
npub: 'npub1hw6amg8p24ne08c9gdq8hhpqx0t0pwanpae9z25crn7m9uy7yarse465gr'
noteid: 'nevent1qqs0qd3xuqstgqryxzv6n8nqsz558ufyfg9e46d72et5cxr0xysaxaqpz3mhxue69uhhyetvv9ujuerpd46hxtnfdupzpwa4mkswz4t8j70s2s6q00wzqv7k7zamxrmj2y4fs88aktcfuf68akcsrw'
content: 'Sovereign Engineering has proven to be a place where the foundations of the internet are being redefined.'
Expand Down
Binary file removed src/data/common-slides/2-hours-of-conversation.jpeg
Diff not rendered.
Diff not rendered.
Binary file removed src/data/common-slides/bell-labs.jpeg
Diff not rendered.
Binary file removed src/data/common-slides/cypherpunks-write-code.jpeg
Diff not rendered.
Binary file removed src/data/common-slides/endurance.jpeg
Diff not rendered.
Diff not rendered.
Binary file removed src/data/common-slides/genesis-block.png
Diff not rendered.
Binary file removed src/data/common-slides/hal-finney.jpeg
Diff not rendered.
Binary file removed src/data/common-slides/pirate-ship-2.jpeg
Diff not rendered.
Binary file removed src/data/common-slides/pirate-ship.jpeg
Diff not rendered.
Binary file removed src/data/common-slides/re-invent-the-future.jpeg
Diff not rendered.
Binary file removed src/data/common-slides/school-of-athens.jpeg
Diff not rendered.
Binary file removed src/data/common-slides/show-talk-build-loop.jpeg
Diff not rendered.
Binary file removed src/data/common-slides/solvitur-ambulando.jpeg
Diff not rendered.
Binary file removed src/data/common-slides/soveng-shirt.jpeg
Diff not rendered.
Binary file removed src/data/common-slides/surveillance-capitalism.jpeg
Diff not rendered.
Binary file removed src/data/common-slides/walking.jpeg
Diff not rendered.
Binary file removed src/data/common-slides/wide-open-sea.jpeg
Diff not rendered.
Binary file removed src/data/highlights.png
Diff not rendered.
37 changes: 0 additions & 37 deletions src/data/no-solutions-transcripts/00 - Teaser - essence.md

This file was deleted.

Loading