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

时间:2019-01-24 10:33:56

标签: php git amazon-web-services github

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

1 个答案:

答案 0 :(得分:1)

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

  • 用于Windows的腻子
  • 对于ubuntu和mac使用终端

2)在专用服务器上安装git。 how to install ?

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 .