简体   繁体   English

在工作中的共享网络驱动器上使用版本控制系统

[英]Using a Version Control System on a Shared Network Drive at Work

I am trying to set up a version control system at work to manage python code among multiple collaborators (ideally, the VCS would be integrated into IntelliJ PyCharm). 我正在尝试设置一个版本控制系统来管理多个协作者之间的python代码(理想情况下,VCS将集成到IntelliJ PyCharm中)。

I am familiar with GitHub, which I have played around with. 我熟悉我玩过的GitHub。 But I am leery of putting the intellectual property (code) of the company on GitHub servers (even if it is a paid, private repository). 但我很遗憾将公司的知识产权(代码)放在GitHub服务器上(即使它是一个付费的私有存储库)。 I would like to basically take advantage of Git VCS, but instead of storing repositories on GitHub online servers, I would instead like these repositories to be on our the Shared Windows Drive @ work. 我想基本上利用Git VCS,但我不想将存储库存储在GitHub在线服务器上,而是希望这些存储库位于我们的共享Windows驱动器@工作中。 Is it possible to do this with Git? 用Git可以做到这一点吗?

Here is the set up: Each user has a local drive and access to the shared drive I want each user to have a local repository on their local drives, which they can push to the 'master' repository on the shared drive (pending checking the code differences and approvals, which I currently do on the GitHub website via 'pull request'). 以下是设置:每个用户都有一个本地驱动器和访问共享驱动器我希望每个用户在其本地驱动器上有一个本地存储库,他们可以将其推送到共享驱动器上的“主”存储库(等待检查代码差异和批准,我目前通过“拉取请求”在GitHub网站上进行。

Does that make sense? 那有意义吗? I can't seem to find any tutorials / documentation on how to achieve this! 我似乎无法找到有关如何实现这一目标的任何教程/文档!

Thank you! 谢谢!

You can certainly use git without github. 你当然可以使用没有github的git。

Placing the origin repo on a shared drive is one option, but it has some disadvantages. 将原始仓库放置在共享驱动器上是一种选择,但它有一些缺点。 (To avoid confusion, by the way, its a good idea to refer to the source repository as origin ; in git terminology, master is the default branch.) (顺便说一下,为了避免混淆,最好将源存储库称为 ;在git术语中, master是默认分支。)

You will still need each developer to clone the repo, and they should use file:// URL's to clone it. 您仍然需要每个开发人员克隆存储库,他们应该使用file:// URL来克隆它。 (Just using the path will work, but may cause additional issues.) So for example (只是使用该路径将起作用,但可能会导致其他问题。)例如

git clone file://server/share/path/to/repo

Another option is to internally host a server that supports git. 另一种选择是在内部托管支持git的服务器。 You could use something like GitLab. 你可以使用像GitLab这样的东西。 Or you could host it in TFS. 或者您可以在TFS中托管它。 Or there are others... (You also can just put it on a web server, but again this won't get you advanced workflow features etc.) 或者还有其他......(你也可以把它放在网络服务器上,但是这也不会让你获得高级的工作流功能等)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM