是否有 gedit 的 ftp 插件可以让我在本地工作?
我正在尝试从Windows环境切换到Linux。我主要是 PHP 开发人员,但我对其他语言(例如 CSS、XHTML 和 Javascript)也了解很多。我需要一种在本地编辑文件的方法,因为我在 git 存储库中工作并且需要提交我的保存。在 Windows 上我使用 Aptana 和 PDT。我会保存我的文件,通过 Aptana 上传,然后使用 git 提交我的工作。
我现在需要在我的 Linux 机器上运行一个工作流程。如果您知道更好的方法,请告诉我,但我真正的问题是,是否有一个插件可以允许 gedit 上传文件而不是远程工作?
I'm trying to switch from a windows environment to Linux. I'm primarily PHP developer, but I do know quite a bit about other languages such as CSS, XHTML and Javascript. I need a way of editing my files locally because I work in a git repository and need to commit my saves. On windows I used Aptana and PDT. I'd save my files, upload via Aptana, then commit my work with git.
I need to get a work flow going on my Linux machine now. If you know a better way to do this let me know, however my real question is, is there a plugin that allows gedit to upload files instead of working remotely?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
git 是为分布式开发而设计的,并且作为一种将代码部署到 Web 服务器的机制运行良好。
在您的 Linux PC 上,
git clone
您的 git 存储库 URL。在本地编辑并提交,然后将更改推送
到 git 存储库。然后,如果您在服务器上具有 shell 访问权限,请使用 git pull 将更改复制到您的服务器。要进行 ftp 同步,您可以设置一个分支 ftpbranch,它与服务器上的内容相对应,然后每次您想要将 ftpbranch 与 master 同步时:
现在上传文件:
现在更新 ftpbranch,表明这些文件已复制到服务器:
git was designed for distributed development and works well as a mechanism for deploying code to a web server.
On your Linux PC,
git clone
your git repository url. Edit and commit locally and thengit push
the changes to the git repository. Then, if you have shell access on the server, usegit pull
to copy the changes to your server.To ftp sync, you could set up a branch, ftpbranch, that corresponds to what is on the server, and then each time you want to sync ftpbranch with master:
Now upload the files:
Now update ftpbranch indicating these files have been copied to the server:
使用linux时,您可以将ftp服务器挂载到本地文件夹,然后从该文件夹打开并保存文件将自动下载并上传文件到ftp服务器。
如果您使用 ubuntu,只需点击 Places >连接到服务器.... 在服务类型下拉列表中选择 FTP,填写所需信息,然后不要忘记将其添加为书签。
之后,您可以直接在任何文本编辑器中打开该文件,而不仅仅是 gedit。我会推荐 geany 作为严肃的编程编辑器,因为它有很多简洁的功能,几乎与 Windows 中的 Notepad++ 相同。
但是,既然您已经使用了 git,为什么不直接使用 git push 来获取更新并使用 git pull 来上传更新呢?我早就手动上传到我的服务器了。 Git 为我完成了所有工作,在服务器之间进行同步。您仍然需要 ftp 的任何特殊原因吗?
When using linux, you can mount the ftp server to a local folder, then opening and save file from that folder will automatically download and upload the file to ftp server.
If you use ubuntu, just click on Places > Connect To Server.... Choose FTP in Service Type dropdown, fill in the required info, then don't forget to bookmark it.
After this, you can open the file directly in any text editor, not just gedit. I would recoment geany for serious programming editor, because it have a lot of neat feature, almost same with Notepad++ in Windows.
But, since you already using git, why not just use
git push
to get the update andgit pull
to upload the update? I have long since uploading manually to my server. Git do all the work for me, synchronizing it between servers. Any particular reason why you still need ftp?