Skip to content

Instantly share code, notes, and snippets.

@injust
Last active February 22, 2026 14:15
Show Gist options
  • Select an option

  • Save injust/440c71df4bbca1b5220d739a1cff11d0 to your computer and use it in GitHub Desktop.

Select an option

Save injust/440c71df4bbca1b5220d739a1cff11d0 to your computer and use it in GitHub Desktop.
rsync non-gitignored files with watchexec
#! /usr/bin/env bash
watchexec --interactive --on-busy-update=queue --clear -- 'git ls-files -coz --exclude-standard | rsync -avz --mkpath --ignore-missing-args --files-from=- --from0 ./ user@host:/path/to/dest/'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment