Я пытался ответить на этот вопрос: Объединение нескольких репозиториев git для объединения нескольких репозиториев в Windows 10, но выдает ошибку:
"седь", но не созывай como un comando interno o externo,
«sed» не распознается как внутренняя или внешняя команда,
и даже без этого у меня не работает! Это структура микросервиса (minimo1 & 2) в Jhipster:
microsvc1test
|- gateway
| |_.git
|- jhipster-registry
| |_.git
|-minimo1
| |_.git
|-minimo2
| |_.git
- Я следую шагу 1 (отличная идея сделать zip-файл)
- Я выполняю шаг 2А: создаю компакт-диск microsvc1test / gateway / gateway и перемещаю содержимое microsvc1test / gateway в microsvc1test / gateway / gateway (то же самое для остальных)
Мне не нужно вести историю, и эта команда не работает в Windows.
$ git filter-branch --index-filter \
'git ls-files -s | sed "s#\t#&code/#" |
GIT_INDEX_FILE=$GIT_INDEX_FILE.new \
git update-index --index-info &&
mv $GIT_INDEX_FILE.new $GIT_INDEX_FILE' HEAD
- Итак, это новая структура (шаг 3):
microsvc1test
|- gateway
| |_.git
| |-gateway
| |_(the code...)
|- jhipster-registry
| |_.git
| |- jhipster-registry
| |_(the code...)
|-minimo1
| |_.git
| |-minimo1
| |_(the code...)
|-minimo2
| |_.git
| |-minimo2
| |_(the code...)
cd microsvc1test
git init
D:\...\Jhipster\microsvc1test>git pull gateway
D:\...\Jhipster\microsvc1test>git pull jhipster-registry
D:\...\Jhipster\microsvc1test>git pull minimo1
D:\...\Jhipster\microsvc1test>git pull minimo2
, поэтому я получаю несколько из этого:
D:\BasuraTemporal\Jhipster\microsvc1test>git pull gateway
remote: Counting objects: 594, done.
remote: Compressing objects: 100% (564/564), done.
Receiving objects: 100% (594/594), 712.83 KiB | 0 bytes/s, done.
remote: Total 594 (delta 71), reused 0 (delta 0)R
Resolving deltas: 100% (71/71), done.
From gateway
* branch HEAD -> FETCH_HEAD
Затем я создаю новый репозиторий на GitHub, фиксирую и отправляю, но шлюз, jhipster-registry, minimo1 и minimo2 пусты.