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

倾然丶 夕夏残阳落幕 提交于 2019-12-11 04:34:12

问题


I plan to install a basic git server. 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.
  • They connect to the repository server via 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. I'm a bit lost here... :)


回答1:


If you set a "central" git repository server, then that server will have bare repositories only (because of push restriction), meaning:

  • 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.

The current solution is git-annex.




回答2:


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.

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




回答3:


You can use a program like gitosis for that. And this is indeed a common setup.



来源:https://stackoverflow.com/questions/5081074/git-should-source-files-and-repository-be-on-the-same-machine

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!