git equivalent of svn status -u

后端 未结 7 949
无人及你
无人及你 2020-12-08 02:11

What\'s the git equivalent of svn status -u or more verbose svn status --show-updates. The svn status --show-updates command shows th

7条回答
  •  [愿得一人]
    2020-12-08 02:46

    Gits gives us more tools to check an "update". First you have to "download" the up-to-date state of the repository:

    git fetch
    

    Now you can get the list of the changed files:

    git log --name-status ..origin/master
    

    Additionaly, you can see the full list of changes with diff:

    git diff ..origin/master
    

    Meaning of the starting letters are: Added (A), Copied (C), Deleted (D), Modified (M), Renamed (R), changed (T), are Unmerged (U), are Unknown (X), or have had their pairing Broken (B)

提交回复
热议问题