Gitbash (MINGW64) - bash: rsync: 找不到命令

Gitbash (MINGW64) - bash: rsync: 找不到命令

我想将文件从本地计算机复制到远程计算机。我使用 gitbash (MINGW64) 运行以下命令,但出现错误bash: rsync: command not found

rsync -avz  c/local/directory/image.png [email protected]:/remote/directory/

如何为 gitbash 安装重新同步?

我读过以下帖子(为什么找不到rsync?)其中提到添加重新同步的路径作为快速解决方案,但是 Windows 上重新同步的路径是什么?

rsync --rsync-path=/home/elbarna/bin/rsync -avz  c/local/directory/image.png [email protected]:/remote/directory/

答案1

设法通过直接从下载最新的 rsync 文件来修复http://repo.msys2.org/msys/x86_64/提取它。然后复制 rsync at./usr/bin/rsync.exe并将其粘贴到/usr/binGit 安装的文件夹中。在我的机器上,就是C:/Program Files/Git/usr/bin/

相关内容