storybox-reproduction / GIT_FIX.md
raazkumar's picture
Upload GIT_FIX.md with huggingface_hub
fb44d81 verified
# Git Pull Fix — Corrupted Object
## Problem
```
error: invalid object 100644 5cf62d90161727c05c00a6f4fb9531c27c223def for '.agents/plugins/marketplace.json'
Cannot save the current index state
fatal: stash failed
```
## Solution (Windows PowerShell)
### Option 1: Force reset to remote (loses local uncommitted changes)
```powershell
cd D:\Dev\Projects\python\AI\storybox-reproduction
git fetch origin
git reset --hard origin/main
```
### Option 2: Clean re-clone (safest, preserves nothing local)
```powershell
cd D:\Dev\Projects\python\AI
# Backup your .env if you have one
copy storybox-reproduction\.env .\my-env-backup.txt
# Remove corrupted repo
Remove-Item -Recurse -Force storybox-reproduction
# Re-clone
git clone https://huggingface.co/raazkumar/storybox-reproduction
# Restore your .env
copy .\my-env-backup.txt storybox-reproduction\.env
```
### Option 3: Fix git index (preserves changes)
```powershell
cd D:\Dev\Projects\python\AI\storybox-reproduction
# Remove corrupted file from index
git rm --cached .agents/plugins/marketplace.json
# Reset git index
git reset HEAD
# Pull again
git pull origin main
```
## After Fix
```powershell
cd D:\Dev\Projects\python\AI\storybox-reproduction
uv sync
uv run storybox --provider nim --model nvidia/meta/llama-3.1-8b-instruct --nim-key YOUR_KEY
```
## Prevention
The `.agents/plugins/marketplace.json` file is not part of StoryBox — it may have been created by an IDE (Cursor, VS Code, etc.). Add to `.gitignore`:
```
.agents/
```