From 43b0708769eb61392050045b881f8e6ba39c5b66 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Fri, 26 May 2023 00:40:40 +0200 Subject: Massive update to posts, archetypes Added a archetypes for creating notes and posts so it auto-populates fields. Fixed existing posts so they align with the rule of 80 columns now. --- .../2023-05-10-push-to-multiple-origins-at-once-in-git.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'content/posts/2023-05-10-push-to-multiple-origins-at-once-in-git.md') diff --git a/content/posts/2023-05-10-push-to-multiple-origins-at-once-in-git.md b/content/posts/2023-05-10-push-to-multiple-origins-at-once-in-git.md index 7d22950..3d07072 100644 --- a/content/posts/2023-05-10-push-to-multiple-origins-at-once-in-git.md +++ b/content/posts/2023-05-10-push-to-multiple-origins-at-once-in-git.md @@ -1,18 +1,25 @@ --- title: Push to multiple origins at once in Git url: push-to-multiple-origins-at-once-in-git.html -date: 2023-05-10 +date: 2023-05-10T12:00:00+02:00 draft: false --- -This is a quick one. I use my personal Git server as my main server, and I use GitHub only as a mirror. As a result, I constantly forget to push to GitHub. +This is a quick one. I use my personal Git server as my main server, and I use +GitHub only as a mirror. As a result, I constantly forget to push to GitHub. -To push to multiple origins at once in Git, you can create a custom Git alias or use a script to automate the process. Here's an example of how you can achieve this using a Git alias: +To push to multiple origins at once in Git, you can create a custom Git alias +or use a script to automate the process. Here's an example of how you can +achieve this using a Git alias: ```sh git config --global alias.pushall '!sh -c "git remote | xargs -L1 git push --all"' ``` -This command creates a Git alias called `pushall` which, when executed, will push the changes to all the remote repositories associated with the current repository. To use it, simply run `git pushall` instead of `git push` when you want to push to all the remote repositories at once. +This command creates a Git alias called `pushall` which, when executed, will +push the changes to all the remote repositories associated with the current +repository. To use it, simply run `git pushall` instead of `git push` when +you want to push to all the remote repositories at once. That's all, folks. + -- cgit v1.2.3