1

有以下输出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':

4

1 回答 1

0

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

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

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

于 2012-08-16T02:35:01.153 回答