Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save oleglomako/eaacd8670bda3720a37de2c8acaf910e to your computer and use it in GitHub Desktop.
Save oleglomako/eaacd8670bda3720a37de2c8acaf910e to your computer and use it in GitHub Desktop.
Как отправлять исходники в несколько репозиториев одной командой:
Создаем новый remote например "all"
git remote add "all" git@github.com:username/my-repo.git
и добавляем в него несколько адресов для пуша
git remote set-url --add --push "all" git@username/my-repo.git
git remote set-url --add --push "all" git@bitbucket.org:username/my-repo.git
Чтобы запушить сразу в два репозитория
git push all
@fsa
Copy link

fsa commented Aug 28, 2021

Есть побочный эффект. Указатели на головные коммиты удалённых репозиториев не двигаются. Чтобы подвинуть, нужно сделать git push для каждого репозитория. Пушить нечего, но голова перемещается.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment