🔧 (git) add multi push repository
This commit is contained in:
13
scripts/git-multipush.example.ts
Normal file
13
scripts/git-multipush.example.ts
Normal file
@ -0,0 +1,13 @@
|
||||
import { execSync } from "child_process";
|
||||
|
||||
const remotes = ["origin"];
|
||||
|
||||
for (const remote of remotes) {
|
||||
console.log(`Pushing to ${remote}...`);
|
||||
try {
|
||||
execSync(`git push ${remote} main`, { stdio: "inherit" });
|
||||
} catch (err) {
|
||||
console.error(`❌ Failed to push to ${remote}`);
|
||||
}
|
||||
}
|
||||
console.log("✅ All remotes processed.");
|
||||
Reference in New Issue
Block a user