简体   繁体   English

git-源文件和存储库应该在同一台机器上吗?

[英]git - should source files and repository be on the same machine?

I plan to install a basic git server. 我计划安装基本的git服务器。 The point is to, somehow, centralize projects development. 关键是要以某种方式集中项目开发。

However, the computer where I would like to do this isn't that great. 但是,我要执行此操作的计算机不是很好。 I have no more then a few gigabytes available. 我没有更多的可用空间了。

Does this make sense? 这有意义吗?

  • Each workstation will have their own git instalation and their own copy of project files. 每个工作站都有自己的git安装和项目文件的副本。
  • They connect to the repository server via ssh; 它们通过ssh连接到存储库服务器。
  • The server will have only the repositoty information about the project. 服务器将仅具有有关项目的存储库信息。

Is this ok? 这个可以吗?

Edit: - It can be server-less if possible. 编辑:-如果可能,它可以是无服务器的。 The main point is, however, to allow everyone (3 persons uhh) to work on the same project. 但是,要点是允许每个人(3个人)在同一个项目上工作。 I'm a bit lost here... :) 我在这里迷路了... :)

If you set a "central" git repository server, then that server will have bare repositories only (because of push restriction ), meaning: 如果您设置了“中央” git存储库服务器,则该服务器将仅具有存储库 (由于push限制 ),这意味着:

  • not all the files 并非所有文件
  • but only a compressed version of all the history of those files. 但仅是这些文件所有历史记录的压缩版本。

The space taken by those bare repos isn't that important if you are dealing with sources (text files). 如果您要处理 (文本文件),则这些裸仓库所占用的空间并不重要。
But if you have, as a webapp designer, many binaries (mainly pictures), then you need to externalize them in another storage, while keeping your git repos in your central server. 但是,如果作为Web应用程序设计师,您有许多二进制文件(主要是图片),则需要将它们外部化到另一个存储中,同时将git repos保留在中央服务器中。

The current solution is git-annex . 当前的解决方案是git-annex

Not entirely sure what you are asking but..... 不确定您要问什么,但是.....

Git is a distributed version control system (dvcs), so where you have a repository you have all the files and all the history for the entire repository. Git是一个分布式版本控制系统(dvcs),因此在拥有存储库的地方,您将拥有整个存储库的所有文件和所有历史记录。

IMHO in a commercial development environment, it makes sense to have central repository from which official builds can be made, then your developers can push and pull into that repository or a "gatekeeper" can collate changes from your developers and push into the central repository. 恕我直言,在商业开发环境中,有一个可以从中进行正式构建的中央存储库是有意义的,然后您的开发人员可以将其推入该存储库,或者“网守”可以从您的开发人员中整理更改并将其推入中央存储库。

Perhaps look at gitosis , gitolite , github 也许看看gitosisgitolitegithub

You can use a program like gitosis for that. 您可以使用诸如gitosis之类的程序。 And this is indeed a common setup. 这确实是一种常见的设置。

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

相关问题 如何从 git 存储库中提取源文件? - How to extract the source files from a git repository? 提取git存储库后的源文件在哪里 - where are the source files after fetching a git repository 网站图像文件应该包含在GIT存储库中吗? - Should website image files be included in GIT repository? Ansible:如何初始化git裸存储库并将其克隆到同一台机器上? - Ansible: how to init git bare repository and clone it to the same machine? 如何将 git 存储库共享给同一台机器上的特定用户? - How to share a git repository to specific users on same machine? GIT-将现有代码连接到同一本地计算机上的单独存储库 - GIT - connecting existing code to a separate Repository in the same Local machine 如何通过同一存储库在不同计算机上混合不同文件和相同文件 - How to git different files and same files on different computers by the same repository 通过Ruby git gem读取存储库源代码文件? - Read repository source code files through the Ruby git gem? 有没有理由不在开源git存储库中将Python文件的模式设置为可执行文件? - Is there a reason to not set Python files' modes as executable in an open source git repository? 从源代码构建 GNU make。 GIT 存储库中缺少文件 - Build GNU make from source. Missing files on GIT repository
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM