From 6a4cc1b2d7d5322b5989dceddb8b6d7302801cb3 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 2 Jul 2025 23:15:43 +0700 Subject: [PATCH] :pencil: (git) create docs for multi push remote script --- scripts/git-multipush.example.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/git-multipush.example.ts b/scripts/git-multipush.example.ts index 594573d..937ceed 100644 --- a/scripts/git-multipush.example.ts +++ b/scripts/git-multipush.example.ts @@ -1,7 +1,14 @@ import { execSync } from "child_process"; -const remotes = ["origin"]; +/* +This script pushes the current branch to multiple remotes in a Git repository. +It is useful for deploying code to multiple servers or services at once. +Make sure you've set up your remotes correctly before running this script and do commit your changes first! +*/ +const remotes = ["origin"]; // Add your remote names here, e.g., "origin", "vps", etc. if you have multiple remotes + +// Start the push process for (const remote of remotes) { console.log(`Pushing to ${remote}...`); try { @@ -10,4 +17,6 @@ for (const remote of remotes) { console.error(`❌ Failed to push to ${remote}`); } } + +// All remotes processed console.log("✅ All remotes processed.");