Cannot update paths and switch to branch 'snapshot_mixuse' at the same time.
git报错 Cannot update paths and switch to branch 'snapshot_mixuse' at the same time.错误如下:dmj-parent git:(master) git checkout -b snapshot_mixuse --track origin/snapshot_mixusefatal: Cannot upda
·
git报错 Cannot update paths and switch to branch 'snapshot_mixuse' at the same time.
错误如下:
dmj-parent git:(master) git checkout -b snapshot_mixuse --track origin/snapshot_mixuse
fatal: Cannot update paths and switch to branch 'snapshot_mixuse' at the same time.
Did you intend to checkout 'origin/snapshot_mixuse' which can not be resolved as commit?
➜ dmj-parent git:(master) git remote show origin
* remote origin
Fetch URL: git@git.superboss.cc:dmj/jxc.git
Push URL: git@git.superboss.cc:dmj/jxc.git
HEAD branch: master
Remote branches:
master tracked
snapshot tracked
snapshot-item tracked
snapshot_mixuse new (next fetch will store in remotes/origin)
snapshot_wlb tracked
Local branches configured for 'git pull':
master merges with remote master
snapshot merges with remote snapshot
snapshot-item merges with remote snapshot-item
Local refs configured for 'git push':
master pushes to master (local out of date)
snapshot pushes to snapshot (local out of date)
snapshot-item pushes to snapshot-item (up to date)
➜ dmj-parent git:(master)
解决思路:
➜ dmj-parent git:(master) git remote update
Fetching origin
remote: Counting objects: 28, done.
remote: Compressing objects: 100% (22/22), done.
remote: Total 28 (delta 14), reused 0 (delta 0)
Unpacking objects: 100% (28/28), done.
From git.superboss.cc:dmj/jxc
* [new branch] snapshot_mixuse -> origin/snapshot_mixuse
275fed2..b289f38 snapshot_wlb -> origin/snapshot_wlb
➜ dmj-parent git:(master) git fetch
➜ dmj-parent git:(master) git checkout -b snapshot_mixuse origin/snapshot_mixuse
Branch snapshot_mixuse set up to track remote branch snapshot_mixuse from origin.
Switched to a new branch 'snapshot_mixuse'
开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!
更多推荐
已为社区贡献1条内容
所有评论(0)