Getting the difference between two repositories

后端 未结 11 1197
梦如初夏
梦如初夏 2020-11-30 16:33

How can we get the difference between two git repositories?

The scenario: We have a repo_a and repo_b. The latter was created as a copy of repo_a. There have been pa

11条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-30 17:14

    Reminder to self... fetch first, else the repository has not local hash (I guess).

    step 1. Setup the upstream remote and above^

    diffing a single file follows this pattern :

    git diff localBranch uptreamBranch --spacepath/singlefile

    git diff master upstream/nameofrepo -- src/index.js

提交回复
热议问题