2015-09-10 20 views

回答

0

这就是我在解释“Definition of “downstream” and “upstream””:

的DVCS(分布式版本控制系统)转折是:你不知道下游实际上是,自己相对于回购旁您已声明的远程回购。

  • 你知道上游是什么(你是从拉或推到回购)
  • 你不知道什么下游是由(其他回购从拉或推到你的回购)。

您无法看到下游回购站及其分支:他们可以看到您。不是相反的。

你可以做的是设置一个pre-receive hook这将强制执行分支命名策略并拒绝任何推送到不符合该策略的分支。

例如见this hook

# if this is a branch with a prefixed name... 
if echo $ref | grep -q "^refs/heads/.*-" ; then 
... 
else # branch does not have a prefix on the form 'prefix-*' 
    echo "$ref is not a valid branch name. Please consult the naming conventions." 
    exit 1; 
fi 
相关问题