A command line util to live-sync your local directory to remote server
- Make sure you have the following utils installed:
git,rsync,fswatch. - Add execution permissions to the script file:
chmod +x ./syncws.sh - Copy
syncws.shto your path directory, for examplecp ./syncws.sh /usr/local/bin/syncws
Prerequisites:
- Make sure your working directory is a Git repository (the tool uses
.gitignorefile to determine which files should be synced). - Make sure you have set up SSH keys to the remote server, so that you can login via SSH without a password (see the instruction here).
Usage:
syncws [user]@[host-or-ip]:[remote-dir]Example:
syncws [email protected]:/tmp/mydirThe content of your current working directory (except files excluded in .gitignore file) will be synced to the directory on provided host.