Why am I doing this? There is a folder in separate repository that I want to sync with in simplest possible way.
Based on Git Internals Git Objects chapter I was under impression that folders are just subtrees in git. And assumed that it would be possible to create directory that points to already existing tree.
This is what I've tried:
git update-index --add --cacheinfo 040000 b5fd8e9305 rc
b5fd8e9305
is id of tree. This approach only created empty directory. So the question would be: is it possible to add subtree to tee using git update-cache command?
I've also tried method described in Git subtree merging: low level plumbing article. It works fine, though there is still question why update-index
did not work as I expected.