简体   繁体   中英

saving a file via ftp in a git repository

I am using GIT on my server for the first time so that we can pull updates to the cms that we use.

I set up and cloned the repository.

I use codeanywhere as my code editor and have an ftp server setup, but after editing a file with 644 perms, I get a permissions denied error.

Being that I am brand new to GIT, am I doing something wrong here?

Yes don't use FTP ;)... use GIT locally and pull your changes on the server. Don't modify files on your server.

So i don't know what you've done until now. But clone the same repository on your server and when you make changes push them to your remove repository and pull them on your server. You can use deployment systems like Jenkins, Travis or something else to automate your deployment.

But if you upload then a file over FTP the file is modified on your server. When you then pull new changes and you have modified the same file you get an error and the pull stops.

https://www.digitalocean.com/community/tutorials/how-to-set-up-automatic-deployment-with-git-with-a-vps

Here is a short tutorial.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM