Finding where source has branched from git

后端 未结 6 1046
天命终不由人
天命终不由人 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 05:50

    Not a great solution, but to get a guess of which revisions it might be: Assume that some of the files in the tar ball have not been changed since they were branched. Run git hash object against each file in the tar ball, then search for those files in the repository using git show. Then try and find the commits under which these files were included, possibly using git whatchanged. The answer to your question might then be the commit with the most common files, but it'll still be a bit hit and miss.

提交回复
热议问题