Background:
We added some files to our git repository, from another project. Then, we patched these files (over the course of about six months) to support particularities of our application's implementation.
Now, I need to propagate those changes into the project where the files were initially taken from.
I tried to get a list of modified files, between the revision we added them at and the head of the dev branch:
The problem is I cannot find the revision(s) where these files were added to the project.
I tried getting diffs using a prior revision number (one that would be old enough to be at the beginning of our changes):
$ git diff c5362a135d..dev_branch -- subdir/where/the/files/are/at
(in this example, c5362a135d is a revision from before these files were added).
If I diff between c5362a135d and the current HEAD, I cannot see the diffs (only full file listings):
diff --git a/dir/subdir/file.h b/dir/subdir/file.h
new file mode 100644
index 0000000..387b33b
--- /dev/null
+++ b/dir/subdir/file.h
....
Question:
How do I find the git revision where some file/directory was added to the repository?
(so that current revision of the file will not be diff-ed with /dev/null
, but with the file that was originally added).
Environment:
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.04
DISTRIB_CODENAME=lucid
DISTRIB_DESCRIPTION="Ubuntu 10.04.4 LTS"
$ $ git --version
git version 1.7.0.4