search

Home  >  Q&A  >  body text

git - 远程仓库已经更新,为什么fetch然后比较更新内容没有任何输出?

git fetch origin master
git log -p master..origin/master

没有任何输出?在github上明明与本地仓库不相同啊。

git merge origin/master

结果是 already up to date
求救。。。。

给我你的怀抱给我你的怀抱2858 days ago751

reply all(1)I'll reply

  • 我想大声告诉你

    我想大声告诉你2017-04-25 09:05:43

    Use

     git branch --all
    

    View all local branches, you will find

    master
    * dev
    remotes/origin/master
    remotes/origin/dev
    
    git fetch origin
    

    will update your remote branch to the local remote branch

    remotes/origin/master
    remotes/origin/dev
    

    Executing

    git merge origin/master
    
    

    At this time, the local one

    remotes/origin/master 合并到 master 上 你才能看到变化
    

    reply
    0
  • Cancelreply