Skip to content

Instantly share code, notes, and snippets.

@kmdsbng
Created September 27, 2013 02:26
Show Gist options
  • Select an option

  • Save kmdsbng/6723408 to your computer and use it in GitHub Desktop.

Select an option

Save kmdsbng/6723408 to your computer and use it in GitHub Desktop.
# hg-fast-exportインスコ
git clone git://repo.or.cz/fast-export.git
mkdir new_git_repo
cd new_git_repo
git init
/path/to/hg-fast-export.sh -r /path/to/hg_repo
git checkout HEAD
# hgリポジトリをチェックアウトしてgitリポジトリ作成
git init pmasp
cd pmasp
../fast-export/hg-fast-export.sh -r ~/work/pmasp --force
# 消したいファイルを削除
git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch doc/spec/money_db/" --prune-empty -- --all
rm -rf .git/refs/original
git reflog expire --expire=now --all
git gc --aggressive --prune=now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment