13

Windows 7 で Git Bash を使用してローカル パスを別のドライブに同期しようとしています。cwRsync をダウンロードし、ファイルを Git bash bin ディレクトリにコピーしました。rsync を実行できますが、次のコマンドで問題が発生します

rsync -av /c/00-dev/05-batch /f/RSYNC/ ソースと宛先の両方をリモートにすることはできません。rsync エラー: main.c(1135) での構文または使用法エラー (コード 1) [レシーバー = 3.0.6]

どちらのパスも正しいですが、同期しません。

4

3 に答える 3

14

回避策:相対パスを参照してcdください/crsync

したがって、これは機能します:

cd /c
touch temp/test.txt
rsync temp/test.txt temp/test2.txt

これはそうではありませんが、次のことcdをしても/c

$ rsync /c/temp/test.txt /c/temp/test2.txt
The source and destination cannot both be remote.

に付属の Git Bash でテスト済みgit 2.9.0.windows.1

于 2016-07-21T11:17:56.427 に答える