LoginSignup
27
20

More than 5 years have passed since last update.

rsyncで.gitignoreにあるファイルを無視してリモートにコピーする

Posted at

-C--filter を使う。

rsync -C --filter=":- .gitignore" -acvz --delete /path/to/project/ user@example.com:/path/to/project/

古いバージョンの rsync だと、 -C.git/ が無視されない場合があるので、新しいバージョンのものを使うと良い。

aliasを設定しておくと便利。

alias rsync-git='rsync -C --filter=":- .gitignore"'
27
20
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
27
20