search

Home  >  Q&A  >  body text

版本控制 - git status 一直报错!远程有更改却提示working directory clean

错误

使用的是git + win7 x64.远程发生修改,但是本地使用git status却提示director clean

$ git status origin
On brranch master
Your branch is up-to-date with 'origin/master'

nothing to commit,working directory clean

问题

1)我远程的已经发生了修改,但是我使用 git status origin 却提示nothing
2)如何才可以在git 命令里面进行复制

曾经蜡笔没有小新曾经蜡笔没有小新2809 days ago980

reply all(2)I'll reply

  • 世界只因有你

    世界只因有你2017-04-26 09:04:25

    git status origin...What a brilliant idea! What a shame Git hasn’t implemented this yet.

    Back to the topic, let’s talk about a few key points (the following assumes that the current branch is master and the remote library is named origin):

    1. Get remote changes locally (just get them, not merge yet): git remote update 或者 git fetch origin
    2. Then, git status -uno: allows you to see whether the current branch is ahead/behind/forked from the remote branch it tracks
    3. Or, git show-branch *master: allows you to see the commits of all branches whose names end in master, so you can see the differences between origin/master and master at the commits level
    4. Finally, git diff origin/master: allows you to see the differences between origin/master and master at the code (file) level

    It’s up to you whether you want to merge or do something else later.

    reply
    0
  • ringa_lee

    ringa_lee2017-04-26 09:04:25

    Let me talk about the second question, right-click on the top of the window, edit, mark the selection and copy it directly

    reply
    0
  • Cancelreply