2

I have a folder with an unknown version of a project versioned with git. The project in the folder (not versioned) have some minor changes that i would introduce in the main versioned project.

I know that the folder project started from a commit a point in the time that is in my versioned project.

I want to find the original starting commit, create a branch, apply the minor changes and then push up everything up to the master.

How can i do this? I can assume that some files has not changed so, is possible to find a version (commit sha) of a file?

1 Answers1

0

git log --name-only will list the files associated with each commit sha.

If you have a particular file in mind you can use git log \-- filename

e.g. git log \-- main.c

This will show only commits which affect main.c

Randy Leberknight
  • 1,363
  • 9
  • 17