- linux zip 忽略 .git 文件夾
# zip 命令
zip -r bitvolution.zip bitvolution -x *.git*
# tar命令压缩文件夹忽略 .git文件夹
tar -zcv --exclude='.git' --exclude='.gitignore' -f test.tar.gz ./*
zip 如果需要忽略多个目录
使用
zip -r test.zip test/ -x@exclude.lst
exclude.lst 文件 的内容是
*.git*
*/laravel/vendor/*
*/thinkphp/vendor/*
Refrences
- tar: --exclude=“.git”: Cannot stat: No such file or directory
- ssh 免密碼登錄 Linux使用ssh公钥实现免密码登录Linux
- ssh 配置跳板机
- ZIP 打包时过滤指定目录和文件 zip 忽略多个目录