前端代码,
就是一些静态文件,
现在想通过一条命令直接部署,
应该怎么做?
rsync 也是不错的选择。
使用scp就行,语法如下scp local_file remote_username@remote_ip:remote_folder ,例如这样:scp -r mylocaldir remote@xxx.xxx.x.xxx:/Users/user/dir,这个过程要你输入远程服务器的登陆密码
加上 -r (指recursively)的flag: scp -r [localdir] [user@host:remotedir]。
...一条只有 scp 了
git 要3条
FTP的话 ...
rsync -av
是个很好的选择