在专用服务器上部署Github公共项目(PHP)



我的项目是在GitHub上开发的,现在我想将其部署到专用服务器,任何帮助将不胜感激。

1) 使用 SSH 登录到您的专用服务器。

  • 对于窗户,请使用腻子
  • 对于 Ubuntu 和 Mac,请使用终端

2) 在您的专用服务器上安装 git。如何安装 ?

3)之后遵循以下通信:

克隆存储库git clone https://github.com/username/repositoryname.git

进入存储库cd repositoryname

之后,如果您在代码编辑器中添加一些新代码,请在本地 git 存储库中使用以下命令:

git add .                    // this will add your code to local git repo
git commit -m "code updated" // this will commit your changes in local git repo
git push                     // this will push your code from local git repo to github repo

之后转到 SSH ,转到服务器上的存储库并使用以下命令提取最新代码:

git pull     //it will pull your code to your server .

最新更新