亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

github - git pushes local files to the root directory of the linux server website?
僅有的幸福
僅有的幸福 2017-05-02 09:26:19
0
2
943

I am learning to write a website. js cs htmlAfter writing it, it takes a long code to push it to the server every time using ssh. How to push the local website files to the remote server using git command (ip 1.1.1.1) Under the root directory of the website /home/www (the github library and local library of web page files have been built).
OS:
Local: Ubuntu 14.04
Server: Centos 6.5

僅有的幸福
僅有的幸福

reply all(2)
左手右手慢動(dòng)作

Git also transfers your files to the server through ssh, why not use ssh directly?

scp -r somefiles username@1.1.1.1:/home/www/ 

Improve efficiency a little more, incremental update:

rsync -avzPe ssh somefiles username@1.1.1.1:/home/www/

If you only want to use git, you have to modify post-update.sample under hooks in the .git directory in your git warehouse on the server.
Add a line of git pull and name it post-update and give it execution permissions (chmod +x post-update).

左手右手慢動(dòng)作

There is a hook file in git, which can realize automatic deployment. You can search Baidu and Google for the specific usage. It can automatically deploy the program you uploaded from git to the folder you specify

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template