らいふうっどの閑話休題

興味のあることをゆる~く書いていく

Git for Windows で、bash: rsync: command not found 問題を解消するメモ

Git for Windows で、bash: rsync: command not found 問題を解消するメモ
A note to fix bash: rsync: command not found problem on Git for Windows

フォークしたリポジトリWindows PCで、クローンした後に本家リポジトリに追従させる時にエラーが出た。
There was an error when following the original repository after cloning the forked repository on a Windows PC.

$ git fetch upstream master
$ bash: rsync: command not found

色々文献を調査したけど、解決したやり方は、以下の通り。
I have researched various documents, but the solution is as follows.

How to Add rsync to Git Bash for Windows 10 へアクセス
Access How to Add rsync to Git Bash for Windows 10

gist.github.com

f:id:ic_lifewood:20200906223807p:plain

rsync-3.1.2-2-x86_64.pkg.tar.xz をダウンロード
Download rsync-3.1.2-2-x86_64.pkg.tar.xz

f:id:ic_lifewood:20200906224010p:plain

ファイルを解凍します。
Unzip the file.

f:id:ic_lifewood:20200906224020p:plain

usr フォルダをコピーします。
Copy the usr folder.

f:id:ic_lifewood:20200906225112p:plain

以下のフォルダに貼り付けます。
paste it into the following folder.

例:C:\Program Files\Git
example: C:\Program Files\Git

f:id:ic_lifewood:20200906225116p:plain

Git Bash を起動して、以下のコマンドで、バージョンが表示されれば、完了です。
Start Git Bash, and if the version is displayed with the following command, you are done.

$ rsync --version
rsync  version 3.1.2  protocol version 31
Copyright (C) 1996-2015 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
Capabilities:
    64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
    socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
    append, ACLs, no xattrs, iconv, symtimes, prealloc

rsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you
are welcome to redistribute it under certain conditions.  See the GNU
General Public Licence for details.

$

f:id:ic_lifewood:20200906225706p:plain

セットアップメモ

gurezo.github.io