Skip to content

Migration from sourceforge

Vissarion Fisikopoulos edited this page Oct 25, 2019 · 1 revision

Migration from svn to git

Brief notes on our migration from https://sourceforge.net/projects/respol to https://github.com/vissarion/respol The sourceforge repo is kept for historical reasons. We have followed https://blog.axosoft.com/migrating-git-svn for migration. Important note "remove the --stdlayout flag" !

The following commands were very useful to clean and setup the new git repository.

Clean all empty commits

git filter-branch --prune-empty --tag-name-filter cat -- --all

Make changes permanent

git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d

Show all files in history

git log --pretty=format: --name-status | cut -f2- | sort -u

Delete file from history

git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch path_to_file" HEAD

Delete directory from history to reduce repos size

rm -Rf .git/refs/original
rm -Rf .git/logs/
git gc --aggressive --prune=now```

Count commits

```git rev-list --count HEAD```
Clone this wiki locally