Created
March 10, 2024 12:56
-
-
Save xavierskip/20f4eaf545f86d42685d06d819efaafb to your computer and use it in GitHub Desktop.
The git hook pre-push script on Windows uses WSL to execute the rsync command for file synchronization.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# https://stackoverflow.com/a/67658259/1265727 | |
# solve:The source and destination cannot both be remote. | |
# rsync error: syntax or usage error (code 1) at main.c(1428) [Receiver=3.2.7] | |
export MSYS_NO_PATHCONV=1 | |
wsl rsync -azhP raspi:/home/pi/www/ /mnt/z/backup/www | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment