等价的分支。< name> .merge for git-push [英] Equivalent of branch.<name>.merge for git-push
问题描述
根据 git-config
文档为分支。< name> .merge
:
分支。< name> .merge
定义< c>分支。< name> .remote ,给定分支的
上游分支。它告诉git fetch / git pull / git
rebase 要合并的分支并且也可以影响 git push (见
push.default
)。
有一个等价的设置来指定上游分支推送到给定的分支?这是我想实现的行为 - 比如说我有一个分支 A
,并且 remote
设置为来源
。从分支 A
运行 git push
,结果应该等同于运行 git push refs / heads / A:refs / for / master
。
另外,是否存在 remote。*的值。推动
这将实现这种行为?将 remote.origin.push
设置为 refs / heads / *:refs / for / master
导致无效的refspec。
我认为这篇文章可能会有帮助: HEAD的git别名:refs / for / master
According to the git-config
documentation for branch.<name>.merge
:
branch.<name>.merge
Defines, together with
branch.<name>.remote
, the upstream branch for the given branch. It tells git fetch/git pull/git rebase which branch to merge and can also affect git push (seepush.default
).
Is there an equivalent setting to specify the upstream branch to push to, for the given branch? This is the behaviour I want to achieve - say I have a branch A
with remote
set to origin
. On running git push
from branch A
, the result should be equivalent to running git push refs/heads/A:refs/for/master
.
Alternatively, is there a value of remote.*.push
which will achieve this behaviour? Setting remote.origin.push
to refs/heads/*:refs/for/master
resulted in an invalid refspec.
I think that this post may be helpful: git alias for HEAD:refs/for/master
这篇关于等价的分支。< name> .merge for git-push的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!