[英]How can I use git to version-control linux folder from windows development IDE remotely?
Is there any IDE function or any tools( I use Zend Studio ) to allow programmers to code in Windows but the code is saved on a linux server with git? 是否有任何IDE函数或任何工具(我使用Zend Studio)来允许程序员在Windows中进行编码,但这些代码使用git保存在Linux服务器上? I assume not every programmer needs to have a full stack of testing enviroment on his local PC, right? 我认为并非每个程序员都需要在其本地PC上拥有完整的测试环境,对吗?
(I imagine that the best practice is to be able to create a testing server instance which is virtual machine with full stack testing enviroment set up already. Though I never see one.) (我认为最佳实践是能够创建一个测试服务器实例,该实例是已经设置了完整堆栈测试环境的虚拟机。尽管我从未见过。)
I tried Zend Studio, it seems that I can only clone/create/import a local git repository/branch on my windows machine. 我尝试过Zend Studio,看来我只能在Windows机器上克隆/创建/导入本地git存储库/分支。
I've heard of using Samba remote file sharing mechanism so to map a hard drive on my windows so to allow me to accomplish this. 我听说过使用Samba远程文件共享机制,以便在Windows上映射硬盘驱动器,以便完成此操作。
I wonder if there is any other way. 我想知道是否还有其他方法。
Thanks. 谢谢。
You can use git over ssh to access your repositories on linux by cloning them to your Windows computer and pushing back over to your server. 您可以在ssh上使用git来访问Linux上的存储库,方法是将它们克隆到Windows计算机,然后再推送回服务器。 You do your work on your IDE that works on Windows on your local clone and push back over to your server for testing. 您可以在可在本地克隆的Windows上运行的IDE上进行工作,然后将其推送回服务器以进行测试。
Another solution would be to mount your server as an SSH drive in Windows. 另一个解决方案是在Windows中将服务器安装为SSH驱动器。 There are several software available for this but https://www.eldos.com/sftp-net-drive/ has worked for me in the past. 可以使用多种软件,但是https://www.eldos.com/sftp-net-drive/过去对我有用。 After mounting you can work on your server files. 挂载后,您可以处理服务器文件。
One last solution I can think of is using the first solution but adding a post-receive
hook to check you out a copy you can test on. 我能想到的最后一个解决方案是使用第一个解决方案,但是添加了一个post-receive
挂钩,以检出可以测试的副本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.