0

I have part of working directory exported from our repository at unknown date and time - project on that one man worked on, without using of any SCM. Part of files are modified, but im sure that some files are stayed same.

My task is somehow determinate revision from whitch this files is taken from, so i can find what is changed, understand changes, and merge it with our current codebase. Comparsion with HEAD is useless, because there is very many changes been after separation of this project.

It's will be nice to have some "magic GIT command" to which i can give one(or all) files, and git will return ID's of commits in which that files have same length and content.

Does GIT have some command that can give me result like this?

rufanov
  • 3,266
  • 1
  • 23
  • 41
  • Maybe you can write a script which compares your tree with each commit and then spit out the commits with the smallest number of changes (maybe turn of whitespace comparison) – knittl Jun 02 '14 at 11:04
  • @knittl, very nice idea for realisation too! thanks! But it's pretty trivial task, just like mine idea.. I'm sure that this ideas have been not only your and mine mind. Git must have functionality like this! :) If not... Well.. I can write not script, but complete git-feature and try to send it to git developers. :) – rufanov Jun 02 '14 at 11:13
  • @knittl, question you set as duplicate as this is not very related. – rufanov Jun 03 '14 at 01:02
  • why not? You have a tree from your history, they have a tree from their history. You want to find the commit which matches the tree most closely, they want to find the commit which matches most closely. There's even a script in the question and its answers (You probably have to adapt it, but it should give you a very good starting point) – knittl Jun 03 '14 at 06:00

0 Answers0