What's the -practical- difference between a Bare and non-Bare repository?

后端 未结 11 2273
南方客
南方客 2020-11-22 16:16

I\'ve been reading about the bare and non-bare / default repositores in Git. I haven\'t been able to understand quite well (theoretically) about the differences between them

11条回答
  •  旧巷少年郎
    2020-11-22 16:24

    5 years too late, I know, but no-one actually answered the question:

    Then, why should I use the bare repository and why not? What's the practical difference? That would not be beneficial to more people working on a project, I suppose.

    What are your methods for this kind of work? Suggestions?

    To quote directly from the Loeliger/MCullough book (978-1-449-31638-9, p196/7):

    A bare repository might seem to be of little use, but its role is crucial: to serve as an authoritative focal point for collaborative development. Other developers clone and fetch from the bare repository and push updates to it... if you set up a repository into which developers push changes, it should be bare. In effect, this is a special case of the more general best practice that a published repository should be bare.

提交回复
热议问题