Skip to content

Instantly share code, notes, and snippets.

@injust
Last active November 27, 2025 15:48
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 --restart --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