Git安装最佳实践 [英] Git Setup Best practices

查看:91
本文介绍了Git安装最佳实践的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我负责为我的办公室设置Git。我们有几个网站。我只是为我们设置了一个网络驱动器来推动我们的修改。我的问题是:我在哪里启动Git存储库?


  1. 每个站点的新dir + init?

  2. 清洁&新驱动器和每个目录不同的网站?

  3. 其他更好的东西我失踪了?



  4. 我从任何和所有人那里寻求建议,特别是如果你诅咒了第一个设置为为什么的人? 解决方案

如果网站(无论您想要告诉那个),而是项目,则回购结构不是问题。



根据经验:


  • 使用ONE( ...


    I was tasked with setting up Git for my office. We have several sites. I just set up a network drive for us to push our changes to. My question is: Where do I init the Git repository?

    1. New dir+init for each site?
    2. One init in the clean & new drive and each dir a different site?
    3. Something else better that I am missing?

    I seek advice from any and all, especially if you've cursed out the first guy to set it up asking "WHY"?

    解决方案

    The structure of repos is not a matter if sites (whatever you want to tell with that) but a matter of projects.

    As a rule of thumb:

    • use ONE (bare, blessed) repo for each independent project
    • if common modules are shared, realize with submodules

    Within each repo, structure the work with branches, and do not confuse branches with means of organizing different software stacks: branches are used to organize the work in one repo (i.e. different development strings of ONE software). One branching model (that seems to be quite popular here at SO) is this one:

    Confused? Curious? Read the explanation...

    这篇关于Git安装最佳实践的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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