小编Ada*_*dam的帖子

如何使用 rsync 备份没有 git 子目录的目录

我想复制我的c目录以及不包括./git子目录的所有子目录。我使用rsync

echo "copy c and sh files "
rsync -a --include='*.c' --include='*.sh' --include='*/' --exclude='*' ~/c/ ~/Dropbox/Public/c
# remove .git directory = do not send it to dropbox. Thx to Tomasz Sowa
rm -rf ~/Dropbox/Public/c/.git
Run Code Online (Sandbox Code Playgroud)

我能做得更好吗?

git rsync dropbox

57
推荐指数
2
解决办法
4万
查看次数

标签 统计

dropbox ×1

git ×1

rsync ×1