zoukankan      html  css  js  c++  java
  • Git branch -r 无法获取远程分支,ui可以看见分支但是git 命令无法查看解决方案

    zhc@hongchangfirst$ git checkout -b hongchangfirst origin/hongchangfirst

    出现:

    fatal: Cannot update paths and switch to branch 'hongchangfirst' at the same time.

    Did you intend to checkout 'hongchangfirst' which can not be resolved as commit?

    然后我们执行命令:

    git branch -a

    里边并不包含远程都hongchangfirst分支。

    远程仓库明明有hongchangfirst分支,可是为什么告诉没有呢?

    原来这条命令并没有每一次都从远程更新仓库信息,这样子做是为了效率,我们可以手动更新一下:

    git fetch origin

    然后我们在git branch -a

    发现了我们都远程分支,然后我们在做新建一个分支:

    git checkout -b hongchangfirst origin/hongchangfirst

  • 相关阅读:
    树的直径
    POJ3264 Balanced Lineup
    [mock]10月11日
    POJ1062 昂贵的聘礼
    POJ3295 Tautology
    [topcoder]TopographicalImage
    POJ1753 Flip Game
    [leetcode]Copy List with Random Pointer
    [leetcode]Candy
    [leetcode]Gas Station
  • 原文地址:https://www.cnblogs.com/leodaxin/p/8569061.html
Copyright © 2011-2022 走看看