简体   繁体   English

如何使用git从Windows开发IDE远程控制Linux文件夹的版本?

[英]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.

相关问题 如何使用Git对我的SQL Server数据库文件进行版本控制? - How can I version-control my SQL Server database files with Git? 您可以使用Git对Java WebDynpro项目进行版本控制吗?如果可以,您需要考虑什么? - can you version-control Java WebDynpro projects with Git and, if yes, what do you have to consider? 在 Windows 中编辑代码但在 Linux 中构建和运行代码时如何使用 git 进行版本控制(使用 pycharm) - How to use git to do version control when I edit my code in Windows but build and run my code in Linux (using pycharm) 用于协作Web应用程序的版本控制(了解Git?) - Version-Control for collaborative web application (understanding Git?) 如何在 Windows/Linux 存储库上的 git 中使用 Eclipse IDE - How to use Eclipse IDE in git on a Windows/Linux repository 如何从分支机构远程进行git归档? - How can I git-archive remotely and from a Branch? CLI 应用程序使用的嵌入式 SQLite 数据库是否应该上传到版本控制(Git)? - Should an embedded SQLite DB used by CLI app be uploaded to version-control (Git)? 我可以使用 git 来控制 Adob​​e Animate 项目的版本吗 - Can I use git to version control Adobe Animate project 如何在git中的其他路径下备份/版本控制文件(具有IDE设置)? - How could I backup/version control my file (having IDE settings) at some other path in git? 如何在远程开发服务器上使用版本控制? - How to use version control on a remote development server?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM