I want to create a repo with the contents of an old repo, but with a fresh commit history, etc. I do not care about preserving the old repo.
However, I just want to make sure that the following steps will not result in the new repo being broken in some way:
- Create a new git annex repo.
- Copy all of the symlinks from the old repo to the new one.
- Move .git/annex/objects from the old repo to the new one.
- Then "git annex add" everything in the new repo and commit.
Please let me know also if there is a better way to achieve the same results.
Thanks for your help.
Create the new repository and then add the "source" repository as a local cache.
This will allow you to copy the symlinks to the new repository and
git annex get
the content, in any order you like, with all the safety precautions of git-annex. The fact that it came from the cache isn't stored either, so it is added cleanly!I use this method very heavily and it works really well.