WSL-Dropbox Workflow
Note: This README is AI-generated
Overview
When working with Dropbox and WSL, file watching and syncing can be slow. This workflow copies projects to WSL for fast local development, then syncs changes back to Dropbox.
Initial Setup
1. Copy project from Dropbox to WSL
cp -r /mnt/c/Users/USERNAME/Dropbox/PATH/TO/PROJECT /home/USERNAME/wsl-projs/2. Configure sync script
Update the variables in the sync script: - WSL_PROJECT_PATH: Your WSL project location (e.g., ~/wsl-projs/project-name/) - DROPBOX_PATH: Your Dropbox destination (e.g., /mnt/c/Users/USERNAME/Dropbox/PATH/TO/PROJECT/) - PROJECT_NAME: Your project name
3. Make script executable
chmod +x utils/sync.shWorkflow
- Work locally in WSL - Make all changes in
~/wsl-projs/project-name/ - Sync regularly - Run
./utils/sync.shto push changes to Dropbox - Changes appear in Dropbox - Files are reflected in the mounted Dropbox folder
Benefits
- Fast file operations in WSL
- No Dropbox sync delays during development
- R/Python packages cached locally
- Dropbox backup maintained
Excluded from sync
renv/directories (library, staging, cache, local)- R project files (.Rproj.user, .Rhistory, .RData, .Ruserdata)
- Add more exclusions in the script arrays as needed
Git Ignored Files Scanner (scan.sh)
Purpose
Tracks which files are being ignored by git and ensures directory structure is preserved by adding .gitkeep files.
Usage
./utils/scan.shWhat it does
- Logs ignored files - Creates
ignored_files.loglisting all git-ignored files - Preserves structure - Adds
.gitkeepto directories containing ignored files - Forces tracking - Adds the log file to git (even though it may be ignored)
When to use
- Before committing to ensure important directories aren’t lost
- To audit what’s being excluded from version control
- When setting up a new project from template
Output
ignored_files.log- List of all ignored files (added to git).gitkeepfiles - Empty files ensuring directories are tracked