RSS Amplifier

Winston Cooke · Mar 18, 2024

git pushall

0
Sign in to vote or save

This page cannot be shown here. You can still read it on the original site — the toolbar below keeps your place in the directory.

git add remote "all" It starts to become bothersome having to push to multiple remote repos (i.e. Github and my nas) manually one-by-one. Linus Torvalds, the creator of git, mentioned 1 back in 2006 that he uses the following method: So for "git push" (where it makes sense to push the same branches multiple times), you can actually do what I do: - .git/config contains: [remote "all"] url =…

git add remote "all"</h2>

It starts to become bothersome having to push to multiple remote repos (i.e. Github and my nas) manually one-by-one. Linus Torvalds, the creator of git, mentioned1</a></sup> back in 2006 that he uses the following method:</p>

So for "git push" (where it makes sense to push the same branches multiple times), you can actually do what I do:</p>

- .git/config contains:</p>

        [remote "all"]</p>

                url = master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6</p>

                url = login.osdl.org:linux-2.6.git</p>

- and not "git push all master" will push the "master" branch to both</em> of those remote repositories.</p> </blockquote>

However, he notes a few issues around fetching, and I think this can be simplified by using some git features that probably didn't exist back in 2006.</p>

git alias pushall</h2>

So why not create an alias?</p>

git</span> config</span> -</span>-global</span> alias.pushall</span> '</span>!git remote | xargs -L1 git push --all</span>'</span></span></code></pre>

Now I can easily push to every remote using git pushall</code>.</p>


  1. https://marc.info/?l=git&m=116231242118202&w=2</a> ↩</a> </li> </ol>

Read on /notes/git-pushall/

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.