Migrate multiple local repositories cloned to a specific directory into a ghq-style directory structure.
- yarn
- Node.js
- ghq
yarn install
yarn build
bin/ghq-migrate <source path> [destination path]
For example, local repositories are stored in the following structure.
$HOME/git
|- repo1 (https://foo.example/user1/repo1.git)
|- repo2 (https://bar.example/user2/repo2.git)
|- repo3 (https://bar.example/user2/repo3.git)
:
bin/ghq-migrate ~/git
$HOME/ghq (ghq root path)
|- foo.example
| |- user1
| |- repo1 (https://foo.example/user1/repo1.git)
|- bar.example
| |- user2
| |- repo2 (https://bar.example/user2/repo2.git)
| |- repo3 (https://bar.example/user2/repo2.git)
: