...
The following steps were followed for the dry run migration of the fcrepo repository. Similar steps will be followed for the final migration of each repository (steps 4 and 5 apply to the fcrepo repository only).
1. Run the Initial Conversion
...
Remove old, unused branches:
No Format |
---|
git branch -D `git branch | grep -v master \ | grep -v maintenance-3.4|grep -v maintenance-2.2` |
Free unused space in the repository:
No Format |
---|
git gc --prune=now git prune |
Avoid 'local uncommitted change' errors later
No Format |
---|
git status |
4. Separate Recent History
...
Use a copy of the result of the previous step:
No Format |
---|
cp -a 3.refs-cleaned 4.recent-history
cd 4.recent-history |
Remove tags prior to 3.3
No Format |
---|
git tag -d `git tag|grep -v 3.[34]` |
Find the id of the 3.3 tagged commit and parent:
No Format |
---|
git log --since=2009-12-18 --until=2009-12-19 |
Filter out everything prior:
No Format |
---|
export lastid=86b96dec0108af8bc160b84f24276962e0c4e2d5
export parentid=100891ba5fd0f1d3869236047867462355e9f1b1
git filter-branch --parent-filter "sed -e 's/-p $parentid//'" \
--tag-name-filter cat -- --all ^$parentid
git for-each-ref --format='%(refname)' refs/original \
| while read ref; do git update-ref -d "$ref"; done
git reflog expire --expire=0 --all
git repack -ad
git prune |
5. Separate Ancient History
...
Use a copy of the result of step 3:
No Format |
---|
cp -a 3.refs-cleaned 5.ancient-history
cd 5.ancient-history |
Remove recent tags, branches, and commits:
No Format |
---|
git tag -d `git tag|grep 3.[34]`
git branch -D maintenance-3.4
git reset --hard (parent of lastid)
git gc --prune=now
git prune |