diff options
author | 2013-06-18 02:12:01 +0000 | |
---|---|---|
committer | 2013-06-18 02:12:01 +0000 | |
commit | 948e22db99ff3126d5a9f785a22171c661489d68 (patch) | |
tree | 3ee9dad18a6d3beb61efc9397237e3c7a01ced4c | |
parent | 830781033b8a36e77dcd9ae8eda83cde02e500fc (diff) |
Added a comment: drop "content removed from annex" history
-rw-r--r-- | doc/forum/safely_dropping_git-annex_history/comment_3_e3beb8acb075faaeef6c052aecbf0a41._comment | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/doc/forum/safely_dropping_git-annex_history/comment_3_e3beb8acb075faaeef6c052aecbf0a41._comment b/doc/forum/safely_dropping_git-annex_history/comment_3_e3beb8acb075faaeef6c052aecbf0a41._comment new file mode 100644 index 000000000..fbcbdbc4f --- /dev/null +++ b/doc/forum/safely_dropping_git-annex_history/comment_3_e3beb8acb075faaeef6c052aecbf0a41._comment @@ -0,0 +1,50 @@ +[[!comment format=mdwn + username="http://vjt.myopenid.com/" + nickname="vjt" + subject="drop "content removed from annex" history" + date="2013-06-18T02:12:01Z" + content=""" +Joey, + +dropping the git-annex branch and subsequent fsck worked. Moreover, as I turned my repository in containing over 700k objects due to a silly cycle of `git annex add` / `git annex unannex`, bloating *both* `git-annex` and `master` history, to clean up I successfully performed a squashed rebase of master onto itself. + +Here's what I did, in detail: + + $ git checkout git-annex + $ cp *.log .. + $ git checkout master + $ git br -D git-annex + $ git br -D synced/git-annex + $ git checkout <first commit> + $ git checkout -b git-annex + $ cp ../*.log . + $ <remove the changes done in the first commit, my case just adding a .gitignore> + $ git add *.log + $ git commit --amend -m 'Init' + +With this, I got rid of the many `update` commits. Now, the fun part: + + $ git checkout master + $ git rebase -i <first commit> + <In the git-rebase-todo, I squashed almost everything, except a few commits I wanted to preserve> + $ :wq + +Rebase went fine, and I was left with a clean master. I brought also `synced/master` up to date: + + $ git checkout synced/master + $ git reset --hard master + +Now I re-created all the location links with fsck: + + $ git annex fsck + +And eventually, got rid of the redundant history: + + $ git reflog expire --expire=now --expire-unreachable=now --all + $ git gc --prune=now + $ git repack + $ git prune + +yay, 500k objects less ^_^'. + +"""]] |