phpstorm配置vcs自动上传代码

1.打开phpstorm中配置vcs的地方:

phpstorm配置vcs自动上传代码

2.开始配置

   (1)点击 + 号

    (2)填写下面的配置信息

注意: 1、 Root path 配置的值一定是 / ,不然上传不成功;2、点击 Test SFTP connection... 报错:Connection to '192.168.1.250' failed.Invalid descendent file name "\".  不用理会,不影响配置是否成功phpstorm配置vcs自动上传代码

3.配置 ctrl + s 后,自动上传到服务器上

phpstorm配置vcs自动上传代码 

 如果最后发现更改的代码在服务器上没有同步成功,点击上图的 √之后,点击Use this server as default,重新看下代码是否同步成功.

phpstorm配置vcs自动上传代码

【end】