git push / merge config

时间:2012-08-16 02:25:03

标签: git

git remote show

中有以下输出
git remote show origin
remote origin
Fetch URL: https://user@server/path
Push  URL: https://user@server/path
HEAD branch: master
Remote branch:
  master tracked
Local branch configured for 'git pull':
  master merges with remote master
Local ref configured for 'git push':
  master pushes to master (up to date)

配置Local branch configured for 'git pull':Local ref configured for 'git push':的位置?

1 个答案:

答案 0 :(得分:0)

您可以运行git config --list查看完整的git配置,其中包含名为branch.<BRANCHNAME>.mergebranch.<BRANCHNAME>.remote的部分。这些定义了给定本地分支的上游分支。来自branch.<name>.mergegit-config(1)的条目:

  

与branch..remote一起定义上游分支
  对于给定的分支。它告诉git fetch / git pull / git rebase   分支合并,也可以影响git push(参见push.default)。

push.default选项影响git push在命令行上没有显式引用的情况。