在Windows局域网上的Git [英] Git on a Windows Lan

查看:246
本文介绍了在Windows局域网上的Git的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我和我的同事正在考虑给予git一个尝试,看看我们是否可以轻松地采取行动。我们在仅限Windows的环境中工作。在我们自己的机器上,我们已经有了使用mingw32和SmartGit作为gui客户端的git。

是否有一种基于共享文件夹概念的简单方法,而不是基于概念托管服务器?例如,我们希望在局域网上共享的文件夹上托管一个git存储库,将其克隆到我们的机器上,并查看如何将更改推回到该文件夹​​,合并它们等。



我们的第一个问题是从局域网克隆。当然,git不会识别像 \\mymachine\shared\repo



这样的路径。从我们的方法开始?是可行的吗?有什么建议?



在此先感谢。



编辑



如上所述,命令行方式奏效。我们还必须反斜线,这样 git clone // machine / directory / repository 才能做到这一点。现在,我的同事有一个本地副本工作,做了一些改变......如何将他们推回到共享文件夹?



在本地路径上推送和读取也是如此,我们启动并运行了我们的测试。谢谢大家!

解决方案

我的建议避开了您的努力,但我一直使用完全相同的方法来使用Mercurial这里已经描述过,如果没有太多的计划改变,我鼓励你使用 TortoiseHg 一个>一个尝试。 Mercurial使用基于文件路径的存储库,与服务存储库一样工作(例如,它将识别



另外一点,从我所知道的来看,Mercurial的Windows支持还差得很远,而git仍然存在一些附带兼容性问题(尽管看起来你已经解决了在Windows上使用git的许多最大挑战)

My colleagues and I are thinking of giving git a try and see if we can easily move to it. We work on a Windows-only environment. On our own machines we already have git set up with mingw32 and SmartGit as gui client.

Is there an easy approach based more on the concept of sharing folders than on the concept of "hosting server"? For example, we wanted to host a git repository on a folder shared on the lan, clone it on our machines and see how to push our changes back to that folder, merge them and so on.

Our first problem was cloning from the lan. Of course git doesn't recognize paths like \\mymachine\shared\repo

How to start with our approach? Is to doable? Any advice?

Thanks in advance.

EDIT

As suggested, a command line approach worked. We also had to invert the slashes, so that git clone //machine/directory/repository did the trick. Now, my colleague had a local copy working, made some changes... How to push them back to the shared folder?

Push and Fetch work on local paths too, we're up and running with our tests. Thank you all!

解决方案

My advice sidesteps your efforts a bit, but I've been using Mercurial in exactly the same approach you've described here, and if it's not too much of a plan change, I'd encourage you to give using TortoiseHg a try. Mercurial works with file path based repositories exactly the same way it works with "served" repositories (e.g. it will recognize \\server\shared_repo\repo_path as a valid repository path to clone from.)

As an additional point, from what I can tell, Mercurial's Windows support is pretty far along, whereas git still has some fringe compatibility issues (although it appears that you've addressed many of the biggest challenges to using git on Windows already)

这篇关于在Windows局域网上的Git的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆