老实说,我找不到任何输出的详细文档git remote show
(当然不在手册页上)
特别是,对这些Local
部分的清晰、准确的解释将不胜感激。
我感到困惑的一个例子:
在这里,我有两个遥控器,klas和origin以及它们产生的输出:
> git remote show klas
* remote klas
Fetch URL: ..\klasrepo
Push URL: ..\klasrepo
HEAD branch: master
Remote branches:
experiment tracked
feature tracked
master tracked
pu tracked
stashbranch tracked
Local branch configured for 'git pull':
pu merges with remote pu
Local refs configured for 'git push':
experiment pushes to experiment (fast-forwardable)
feature pushes to feature (fast-forwardable)
master pushes to master (fast-forwardable)
pu pushes to pu (up to date)
> git remote show origin
* remote origin
Fetch URL: C:/Temp/git/.\barerepo.git
Push URL: C:/Temp/git/.\barerepo.git
HEAD branch: experiment
Remote branches:
experiment tracked
master tracked
Local branches configured for 'git pull':
experiment merges with remote experiment
master rebases onto remote master
Local refs configured for 'git push':
experiment pushes to experiment (up to date)
master pushes to master (fast-forwardable)
请注意,experiment和master都列在两者 local refs configured for 'git push'
下。这意味着什么?我已将 master 和 Experiment 配置为分别跟踪origin/master和origin/experiment (并pu跟踪klas/pu)。
我的本地功能分支未设置为跟踪任何内容,但仍列在下面local refs configured for 'git push'
(唯一的连接似乎是相同的名称,未提及另一个非跟踪分支foo)。git push
而在功能上fatal: The current branch feature has no upstream branch.
- 几乎没有“快进”。
似乎列出的本地分支的标准local refs configured for 'git push'
是恰好存在同名的远程分支?
以供参考:
> git branch -vva
experiment 0cf7b2a [origin/experiment] added rand content 82 to .\rand_content.txt
* feature 4b25f46 added rand content 62 to bar.txt
foo 40aee50 added rand content 17 to .\rand_content.txt
master 4b25f46 [origin/master] added rand content 62 to bar.txt
pu 44ad10b [klas/pu] added rand content 51 to doo.txt
remotes/klas/experiment 1f4e89b app
remotes/klas/feature 884e953 added rand content 80 to bar.txt
remotes/klas/master 57877c1 added in tobias repo
remotes/klas/pu 44ad10b added rand content 51 to doo.txt
remotes/klas/stashbranch 8678cf0 added rand content 44 to .\rand_content.txt
remotes/origin/HEAD -> origin/master
remotes/origin/experiment 0cf7b2a added rand content 82 to .\rand_content.txt
remotes/origin/master 4b25f46 added rand content 62 to bar.txt
> git config --list --local | select-string 'branch|remote'
remote.origin.url=C:/Temp/git/.\barerepo.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
branch.master.rebase=true
remote.klas.url=..\klasrepo
remote.klas.fetch=+refs/heads/*:refs/remotes/klas/*
branch.experiment.remote=origin
branch.experiment.merge=refs/heads/experiment
branch.pu.remote=klas
branch.pu.merge=refs/heads/pu
> git --version
git version 1.8.1.msysgit.1