GitHub のレポジトリを整理している

GitHub のレポジトリを整理しはじめた。 GitHub 内に書き捨てたコードが多数あり検索するときのノイズになっていた。

書き捨てる用のレポジトリを作って過去の履歴丸ごと 1つのレポジトリにまとめることにした。

.
├── repo1
├── repo2
└── repo3

以下記事の手順を少し変えて実施している。 あと数十レポジトリあるので作業用メモを残す。

qiita.com

cd /path/to/repo_root
git co -b import-repo1
mkdir repo1
touch repo1/.gitkeep
git remote add import-repo1 git@github.com:mziyut/repo1.git
git fetch import-repo1
git merge --allow-unrelated-histories -X subtree=repo1 import-repo1/master