Finding where source has branched from git

后端 未结 6 1048
天命终不由人
天命终不由人 2021-01-05 05:22

I have a git repository (covering more or less project history) and separate sources (just a tarball with few files) which have forked some time ago (actually somewhere in 2

6条回答
  •  情书的邮戳
    2021-01-05 06:00

    If you have a rough idea as to where the fork occurred, consider using Will Manley's git meld. (See also: View differences of branches with meld?.)

    To do this, add the tarball contents to your repository (which you'll be doing anyway). After installing Meld and git-meld, run

    git meld branch_from_tarball commit_to_check &
    

    on different commits until you find the one with the least differences. This command will open meld and view the changes in the directory tree between the specified commits, with identical files hidden. Example screenshots :

    Meld showing two very different commits:
    Very different

    Showing two similar commits: Similar

提交回复
热议问题