I am trying to use an external SVN repository as a subtree in my repository by merging it with a subtree. I believe that this should keep the history of files in the library intact, but it does not work - files from the library that are combined into a subtree in my main branch have no history, and for fixing, when I add them, here is the history to show that I mean, exactly what I am going to get in this state follows.
lappy8086:YACYAML jamie$ git log --graph * commit 0cc6c4e5061741e67d009f3375ce1d2bcd3ab540 | Author: James Montgomerie | Date: Thu May 17 12:04:43 2012 +0100 | | Subtree-merge in libYAML (from a git-svn checkout). | * commit b5af5af109d77f6adafebc3dcf5a4796a5035a2e Author: James Montgomerie Date: Thu May 17 11:47:32 2012 +0100 First commit, add .gitignore.
Here is what I am doing to try to get this to work:
# check out SVN repo git svn clone http://svn.pyyaml.org/libyaml/branches/stable libYAML # create my repo mkdir YACYAML cd YACYAML git init touch .gitignore git add .gitignore git commit -m "First commit, add .gitignore" # Fetch from git-svn repo I got earlier git remote add libyaml-svn ../libYAML/ git fetch libyaml-svn git checkout -b libyaml-svn libyaml-svn/master # Switch back to master, and try to merge in subtree git checkout master git read-tree --prefix=libYAML/ -u libyaml-svn/master git commit -m "Merge in libYAML as subtree (from git-svn checkout of SVN repo)"
This "works", but as I said when I look at my story, I expect to see the whole story from the libYAML repository, but I donβt ... it is as stated above.
source share