是否可以将 MAMP 本地主机连接到 FTP 以进行快速上传?
当我想上传一些在本地主机上用 MAMP 测试过的文件时,我必须经历一个费力的过程:找到这些文件,然后使用我的 FTP 客户端 FileZilla 将它们上传到相关目录。
有没有办法避免这样做,并且可以在需要时将文件上传到我的 FTP 服务器?
是否值得使用 git 通过 git push 上传文件?
提前致谢。
Xcode开发工具
When I want to upload some files that I have tested with MAMP on my localhost, I have to go through a strenuous process of finding the files and then uploading them to the relevant directory using my FTP client FileZilla.
Is there a way to prevent having to do this and have some way of uploading the file to my FTP server when I want?
Would it be worth using git to upload the files via git push
?
Thanks in advanced.
XcodeDev
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 git push 实际上是行不通的,至少它本身是行不通的。推送仅更新远程端的引用,而不更新工作树,因此您的更改不会受到影响。
但是,您可能可以使用挂钩脚本添加该功能,在这种情况下,如果您已经在使用 Git,那么这肯定是一个方便的解决方案。
另一方面,最简单的解决方案可能是简单地使用
scp
上传文件(既然你说你可以使用git push
,我假设你有 SSH 访问权限) ),保持终端打开,并重复该命令任意次。Using
git push
would actually not work, at least not by itself. Pushing only updates the refs on the remote side, but not the working tree, so your changes would not be effected.You could, however, probably add that functionality using a hook script, in which case it would certainly be a convenient solution if you're already using Git.
The easiest solution, on the other hand, might be to simply use
scp
to upload the files (since you say that you could usegit push
, I assume you have SSH access), keep the terminal open, and repeat the command any number of times.