我经常将笔记本电脑备份到外置硬盘.是否将git repos用于足够好的备份解决方案,或者这个方法有问题吗?
我尝试使用rsync --filter=':+ .gitignore' (-/ exclude作品,但不包括)无济于事。
基本上,我只想在脚本中包含.ignore文件,并使用rsync将其中的所有内容上传到远程服务器。
如果有人能够将sed或awk .gitignore放入适合包含在--filter='merge file' etc中的文件中,我将不胜感激!
或者替代地,一种使rsync理解.gitignore包含的方式。
https://www.kernel.org/pub/software/scm/git/docs/gitignore.html '样式格式'
http://linux.die.net/man/3/fnmatch
https://git.samba.org/?p=rsync.git;a=blob_plain;f=wildtest.txt;hb=HEAD
https://git.samba.org/?p=rsync.git;a=blob_plain;f=wildtest.c;hb=HEAD
rsync中的某些问题bla/仅表示该目录,bla/*表示该目录中的文件,表示该目录bla/**下的bla/***所有内容(包括子目录),最后表示bla及其所有内容,但git可能具有的所有内容bla/
但是排除规则似乎是兼容的。