当我执行以下操作时,我对所看到的内容感到困惑:
git clone git@github.com:RobArthan/pp pp-xxx
cd pp-xxx
git branch sieve
git remote show origin
我得到的输出是:
* remote origin
Fetch URL: git@github.com:RobArthan/pp
Push URL: git@github.com:RobArthan/pp
HEAD branch: master
Remote branches:
fix-3.1w6 tracked
fix-3.1w7 tracked
master tracked
pp_file_conv tracked
sieve tracked
utf8 tracked
Local branch configured for 'git pull':
master merges with remote master
Local refs configured for 'git push':
master pushes to master (up to date)
sieve pushes to sieve (local out of date)
因为我刚刚接受了克隆,什么可以过时以及为什么? question showing a similar example被视为重复,但引用的问题实际上并未解释git remote
输出的含义。
答案 0 :(得分:2)
你已经创建了一个本地分支而不是检查它,这就是git比较并说它已经过时的原因。只需在克隆后输入git checkout sieve
即可解决问题。