156 lines
3.3 KiB
Org Mode
156 lines
3.3 KiB
Org Mode
#+TITLE: Syncthing + Git Hybrid Workflow
|
|
#+author: Amero Garcia
|
|
#+created: [2026-03-16 Mon 14:28]
|
|
#+DATE: 2026-03-06
|
|
#+FILETAGS: :sync:git:syncthing:workflow
|
|
|
|
* Hybrid Architecture: Syncthing + Git
|
|
|
|
** Overview
|
|
Best of both worlds:
|
|
- *Syncthing*: Real-time file sync (phone ↔ host)
|
|
- *Git*: Version control and conflict resolution
|
|
|
|
** Folder Structure**
|
|
```
|
|
~/mind/
|
|
├── .git/ # Git repo (Syncthing ignores this)
|
|
├── .gitignore # Excludes: .git/, temp files
|
|
├── .stfolder/ # Syncthing marker
|
|
├── 0_inbox/ # Your captures (synced)
|
|
├── 1_thinking/ # Notes (synced)
|
|
└── ...
|
|
```
|
|
|
|
* Syncthing Setup
|
|
|
|
*Syncthing Configuration:*
|
|
- Folder: ~/mind
|
|
- Devices: Phone (yours) + Host (mine)
|
|
- Ignore patterns: .git/, .stfolder/, temp files
|
|
- Versioning: Staggered (for safety)
|
|
|
|
*Phone → Host Flow:*
|
|
1. You org-capture on phone
|
|
2. Syncthing detects change
|
|
3. Auto-syncs to host within seconds
|
|
4. File appears in my ~/mind/
|
|
|
|
*Host → Phone Flow:*
|
|
1. I process files
|
|
2. Syncthing syncs back
|
|
3. You see updates on phone
|
|
|
|
* Git Setup
|
|
|
|
*Git Remotes:*
|
|
```bash
|
|
# Primary: ~/mind/.git (local)
|
|
# Backup: Can add remote later if needed
|
|
```
|
|
|
|
*Workflow:*
|
|
|
|
*Your commits (laptop):*
|
|
```bash
|
|
cd ~/mind
|
|
git add .
|
|
git commit -m "Your changes"
|
|
# Syncthing syncs working files to host
|
|
```
|
|
|
|
*My commits (host):*
|
|
```bash
|
|
cd ~/mind
|
|
git add .
|
|
git commit -m "Processed inbox items"
|
|
# You pull when ready: git pull
|
|
```
|
|
|
|
*Conflict Resolution:*
|
|
- Syncthing: Syncs file changes
|
|
- Git: Handles merge conflicts
|
|
- If conflict: Git shows <<<< ==== >>>>, resolve manually
|
|
|
|
* Daily Workflow
|
|
|
|
*Morning (You):*
|
|
1. Check ~/mind/0_inbox/ on phone
|
|
2. Orgzly for quick reading
|
|
3. Org-capture new items
|
|
4. Auto-syncs to host
|
|
|
|
*During Day (Me):*
|
|
1. Syncthing delivers new captures
|
|
2. Org-gtd process: clarify → organize
|
|
3. Move to appropriate PARA folder
|
|
4. Git commit my changes
|
|
5. Syncthing syncs to you
|
|
|
|
*Evening (You):*
|
|
1. Phone shows updated files
|
|
2. Review what I processed
|
|
3. Add new captures for tomorrow
|
|
|
|
* Recommendations
|
|
|
|
*Syncthing Settings:*
|
|
- Rescan interval: 10 seconds (fast sync)
|
|
- Ignore permissions: Yes (Qubes/Debian differences)
|
|
- Versioning: Staggered, 30 days (safety net)
|
|
|
|
*Git Settings:*
|
|
- Frequent small commits (better than large merges)
|
|
- Use .gitignore for Syncthing temp files
|
|
- Set user.name and user.email on both devices
|
|
|
|
*Conflict Prevention:*
|
|
- Don't edit same file simultaneously
|
|
- I work mainly on processing (1_thinking/, etc.)
|
|
- You work mainly on capturing (0_inbox/)
|
|
- Natural separation reduces conflicts
|
|
|
|
* Command Reference
|
|
|
|
*Check sync status:*
|
|
Syncthing web UI: http://localhost:8384
|
|
|
|
*Force sync:*
|
|
Syncthing → Folders → mind → Override Changes
|
|
|
|
*Git status:*
|
|
cd ~/mind && git status
|
|
|
|
*Pull latest:*
|
|
cd ~/mind && git pull
|
|
|
|
*Push (if we add remote):*
|
|
cd ~/mind && git push
|
|
|
|
* Setup Checklist
|
|
|
|
*On Host (me):*
|
|
TODO Verify Syncthing installed and running
|
|
TODO Configure ~/mind folder share
|
|
TODO Add .gitignore entries
|
|
TODO Get device ID
|
|
|
|
*On Phone (you):*
|
|
TODO Syncthing already installed ✓
|
|
TODO Get device ID
|
|
TODO Share with host
|
|
TODO Test sync
|
|
|
|
*Both:*
|
|
TODO Git config user.name/email
|
|
TODO Test org-capture → sync → process flow
|
|
TODO Verify conflict handling
|
|
|
|
---
|
|
|
|
*Next Steps:*
|
|
1. I start Syncthing daemon on host
|
|
2. Get my device ID for you
|
|
3. You add my device to your Syncthing
|
|
4. Test first sync
|
|
5. Test git workflow |