简体   繁体   中英

git-ftp doesn't push changes to ftp

I'm trying to use git-ftp to push files to an FTP server. The server already has files on it, that were uploaded via some different software (GUI drag-n-drop). The Git repository is running on BitBucket, and all of that side of things is working fine. I'm on Mac OSX 10.9.2 using Terminal.

I followed the instructions to apply a .git-ftp.log file to the server by running git-ftp catchup - that worked fine and the file appeared on the server. However when I make a change locally, I commit in the usual way, then attempt to upload the change using git-ftp push , it tells me 'Everything is up to date'.

If I try git-ftp push -a then it tells me 'There are 1 files to sync' (regardless of how many I actually changed), then 'Last deployment changed to ', but then my changes still aren't uploaded.

What am I doing wrong?

Your version of Git-ftp ignores all files that match regular expressions defined in the .git-ftp-ignore file. One of these two patterns should ignore your OSX files:

^\._.*
^.\._.*

You can use the --dry-run option to test what would be uploaded.

Alternatively and probably better would be to update Git-ftp. Newer versions use shell glob patterns similar to the ones in .gitignore . The new pattern would be:

._*

I found this git-ftp installation and configuration very easy and with full details and almost all possibilities like for your case you have to run
git ftp catchup
for the first time insted of
git ftp init
after first time as normal you have to run
git ftp push

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