Files
railseek6/MANUAL_GIT_SETUP.md

224 lines
5.4 KiB
Markdown

# Manual Git Setup for railseek6 Repository
Since Git is not available in the system PATH and the Gitea git.exe has issues, here are manual instructions to set up the Git repository.
## Repository Information
- **URL**: https://git.mtrcompute.com/jleu3482/railseek6
- **Clone URL**: https://git.mtrcompute.com/jleu3482/railseek6.git
- **Credentials**: jleu3482 / jleu1212
## Option 1: Install Git for Windows (Recommended)
### Step 1: Download and Install Git
1. Download Git for Windows: https://git-scm.com/download/win
2. Run the installer with default options
3. Make sure to select "Add Git to PATH" during installation
### Step 2: Set Up Repository
```bash
# Open PowerShell or Command Prompt in the project directory
cd C:\aaWORK\railseek6
# Initialize git repository
git init
# Configure user information
git config user.name "jleu3482"
git config user.email "slclabs@gmail.com"
# Add remote repository
git remote add origin https://git.mtrcompute.com/jleu3482/railseek6.git
# Create .gitignore
echo "# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
# Virtual Environment
venv/
env/
ENV/
env.bak/
venv.bak/
# IDE
.vscode/
.idea/
*.swp
*.swo
*~
# OS
.DS_Store
Thumbs.db
# LightRAG specific
rag_storage/
inputs/__enqueued__/
extracted_images/
extracted_images_test/
openclip_env/
openclip_gpu_env/
*.log
stderr.txt
stdout.txt
download_test/" > .gitignore
# Stage all files
git add .
# Commit changes
git commit -m "Initial commit: LightRAG project with document download and auto-commit
Includes:
- LightRAG main codebase with GPU-accelerated OCR
- Document download endpoint implementation
- Web UI with clickable document references
- Auto-commit system for Git
- Test scripts for workflow validation
- Configuration files and documentation
Features implemented:
1. Document download API endpoint (/api/documents/download/{filename})
2. Clickable document references in search results
3. Secure file serving with authentication
4. Auto-commit functionality for major changes
5. Complete test workflow validation"
# Push to remote
git push -u origin main
# If main branch doesn't exist, try:
git push -u origin master
```
## Option 2: Use VS Code Git Integration
### Step 1: Open VS Code
1. Open the `C:\aaWORK\railseek6` folder in VS Code
2. Go to Source Control panel (Ctrl+Shift+G)
### Step 2: Initialize Repository
1. Click "Initialize Repository" button
2. VS Code will create a .git folder
### Step 3: Stage Files
1. Click "+" next to "Changes" to stage all files
2. Or selectively stage files as needed
### Step 4: Commit
1. Enter commit message: "Initial commit: LightRAG project with document download and auto-commit"
2. Click "Commit" button
### Step 5: Add Remote and Push
1. Click "..." menu in Source Control panel
2. Select "Remote" → "Add Remote"
3. Enter: `https://git.mtrcompute.com/jleu3482/railseek6.git`
4. Name: `origin`
5. Click "Publish Branch" button
## Option 3: Use GitHub Desktop or Other Git Client
1. Install GitHub Desktop: https://desktop.github.com/
2. Add repository: File → Add Local Repository
3. Select `C:\aaWORK\railseek6`
4. Commit changes with appropriate message
5. Publish repository to: `https://git.mtrcompute.com/jleu3482/railseek6.git`
## Auto-Commit System (After Git Setup)
Once Git is set up, use the auto-commit helper:
```bash
# Make your changes to the project
# Auto-commit with description
python git_auto_commit_final.py "Added new feature or fixed issue"
# Or use the simple helper
python simple_auto_commit.py "Description of changes"
```
## Files to Include in Repository
### Essential Files (Should be committed):
- `LightRAG-main/` - Main LightRAG codebase
- `inputs/` - Document input directory (except `__enqueued__/`)
- `*.py` - All Python scripts
- `*.md` - Documentation files
- `*.json` - Configuration files
- `requirements.txt` - Dependencies
### Files to Exclude (in .gitignore):
- `rag_storage/` - RAG database files
- `inputs/__enqueued__/` - Processed documents
- `extracted_images/` - Extracted images
- `openclip_env/` - Virtual environments
- `*.log` - Log files
- `stderr.txt`, `stdout.txt` - Output logs
## Verification
After setup, verify the repository is working:
1. Visit: https://git.mtrcompute.com/jleu3482/railseek6
2. You should see all project files
3. Make a small change and test auto-commit:
```bash
echo "# Test" >> TEST.md
python git_auto_commit_final.py "Test auto-commit system"
```
4. Refresh the repository page to see the new commit
## Troubleshooting
### Authentication Issues
If prompted for credentials:
- Username: `jleu3482`
- Password: `jleu1212`
### Push Rejected
If push is rejected, try:
```bash
git pull origin main --allow-unrelated-histories
git push -u origin main
```
### Git Not Found
If git command is not found:
1. Install Git for Windows (Option 1 above)
2. Or use VS Code Git integration (Option 2)
3. Or restart terminal after installation
## Next Steps After Git Setup
1. **Restart LightRAG server** to activate download endpoint
2. **Test complete workflow**: `python test_workflow.py`
3. **Make regular commits** for major changes
4. **Monitor repository** at https://git.mtrcompute.com/jleu3482/railseek6
## Support
If you encounter issues:
1. Check if Git is installed: `git --version`
2. Verify repository URL is correct
3. Ensure credentials are correct: jleu3482 / jleu1212
4. Check network connectivity to git.mtrcompute.com