Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum wrote:
But that place might not even exist anymore. Which is to say, the directory might have been deleted or renamed. So even if you could get around it by resurrecting it with the old name and immediately renaming it, that might simply not be possible.
You are confusing things here. Files in git have a commit number (the SHA-1 belonging to the commit at the moment in time you are looking at) and a path (directory + filename).
E.g. consider the following commit:
commit f2542cf661424c58d8be8feb6baf37f26e221514 Author: Marcus Comstedt marcus@pike.ida.liu.se Date: Mon Jul 21 21:49:01 2008 +0000
Added fix to make libffi on Linux/PPC64 work with IBM JDK 1.6.0.1.
Any file in that commit can be referenced like: f2542cf:CHANGES f2542cf:src/svalue.c f2542cf:bundles/patches/libffi-3.0.4/src/powerpc/ffi.c
Now, at any point in time in the future, if you deleted the files and possibly their directories (some commits ago), you simply tell git to merge those files back in from the old f2542cf commit. It doesn't really matter where in the current tree you resurrect those files, as long as git has the merge-parent reference to f2542cf, it will know where the file(s) came from and will retain history, regardless of old and new locations in the tree.