Skip to content

Instantly share code, notes, and snippets.

@hongchaodeng
Created March 21, 2022 13:37
Show Gist options
  • Save hongchaodeng/81c8704bb6974e86713a87d966a790d5 to your computer and use it in GitHub Desktop.
Save hongchaodeng/81c8704bb6974e86713a87d966a790d5 to your computer and use it in GitHub Desktop.
rsync code
#!/usr/bin/env bash
path=$1
# sync dir append '/' at the end, e.g. my-code/
rsync -avzhe ssh --progress \
--exclude ".git" \
$path user@remote:$path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment