Skip to content

Instantly share code, notes, and snippets.

@Davidnet
Forked from cgarciae/rsync-watch.sh
Created July 7, 2021 17:49
Show Gist options
  • Save Davidnet/6049b9b06dc36d82aab5f18c8298913e to your computer and use it in GitHub Desktop.
Save Davidnet/6049b9b06dc36d82aab5f18c8298913e to your computer and use it in GitHub Desktop.
rsync project to server
rsync --exclude-from=.gitignore -avz -e ssh . $1
while inotifywait -r -e modify,create,delete . ; do
rsync --exclude-from=.gitignore -avz --delete -e ssh . $1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment