rsync exclude according to .gitignore & .hgignore & svn:ignore like --filter=:C

后端 未结 13 2821
没有蜡笔的小新
没有蜡笔的小新 2020-12-22 17:22

Rsync includes a nifty option --cvs-exclude to “ignore files in the same way CVS does”, but CVS has been obsolete for years. Is there any way to make it also ex

13条回答
  •  星月不相逢
    2020-12-22 17:55

    Short answer

    rsync -r --info=progress2 --filter=':- .gitignore' SOURCE DEST/
    

    Parameters meaning:

    -r: recursive

    --info=...: show progress

    --filter=...: exclude by the rules listed on the .gitignore file

提交回复
热议问题