Emacs - Como enviar um repositório Git para vários controles remotos

Estou procurando ajuda, por favor, usando o Emacs / Magit para enviar as alterações do repositório local para o site remoto e para o Github de uma só vez.

Encontrei um segmento não relacionado ao Emacs / não ao Magit (https://stackoverflow.com/a/3195446/2112489), com comentários afirmando que é a resposta definitiva ao enviar para um controle remoto e para o Github e tem algumas centenas de curtidas. Suponho (talvez incorretamente) que seja um bom ponto de partida para olocal .gitconfig arquivo no$HOME diretório no meu computador.

[remote "GitHub"]
    url = [email protected]:elliottcable/Paws.o.git
    fetch = +refs/heads/*:ref,s/remotes/GitHub/*
[branch "Master"]
    remote = GitHub
    merge = refs/heads/Master
[remote "Codaset"]
    url = [email protected]:elliottcable/paws-o.git
    fetch = +refs/heads/*:refs/remotes/Codaset/*
[remote "Paws"]
    url = [email protected]:Paws/Paws.o.git
    fetch = +refs/heads/*:refs/remotes/Paws/*

O comando Push básico no Emacs / Magit apenas pressiona um de cada vez:

C-u P P [and then use arrow keys to select from the choices in the minibuffer] RET

Veja a folha de dicas Magit sobre os comandos disponíveis:http://daemianmack.com/magit-cheatsheet.html

Pensamento provisório - uso/usr/local/git/bin/git remote -v para obter uma lista de controles remotos que já foram configurados e use os resultados para enviar por push a cada um. . . factível, mas complexo.

$ MP:my_project.git HOME$ /usr/local/git/bin/git remote -v

  origin    [email protected]:lawlist/my_project.git (fetch)
  origin    [email protected]:lawlist/my_project.git (push)
  remote_website    [email protected]:my_project.git (fetch)
  remote_website    [email protected]:my_project.git (push)

RECEITA DE LINHA DE COMANDO - empurrando separadamente para o controle remoto e para o Github:

;; Setup the remote repository and the hook; and the remote destination folder.
ssh [email protected]
mkdir /home/lawlist/my_project.git
cd my_project.git
git init --bare
;; git update-server-info # If planning to serve via HTTP
cat > /home/lawlist/my_project.git/hooks/post-receive ;; RET
#!/bin/sh ;; RET
GIT_WORK_TREE=/home/lawlist/my_project git checkout -f ;; RET
;; C-d
chmod 755 /home/lawlist/my_project.git/hooks/post-receive
mkdir /home/lawlist/my_project
exit

;; On local machine.
mkdir /Users/HOME/.0.data/.0.emacs/elpa/my_project.git
touch /Users/HOME/.0.data/.0.emacs/elpa/my_project.git/README.md
cd /Users/HOME/.0.data/.0.emacs/elpa/my_project.git
/usr/local/git/bin/git init
/usr/local/git/bin/git add .
/usr/local/git/bin/git commit -m "First commit."
curl -u lawlist:12345678 https://api.github.com/user/repos -d '{"name":"my_project.git"}'
/usr/local/git/bin/git remote add origin [email protected]:lawlist/my_project.git
/usr/local/git/bin/git remote add remote_website [email protected]:my_project.git
/usr/local/git/bin/git push origin master
/usr/local/git/bin/git push remote_website master

;; For modification of local files
/usr/local/git/bin/git add .
/usr/local/git/bin/git commit -m "This is a modification . . . ."
/usr/local/git/bin/git push origin master
/usr/local/git/bin/git push remote_website master

questionAnswers(1)

yourAnswerToTheQuestion