From d5792967f19d69f83b1d27733943a67693e459d4 Mon Sep 17 00:00:00 2001 From: Nyx Date: Sun, 9 Nov 2025 04:51:27 -0700 Subject: [PATCH] no message --- upstream_sync.ps1 | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 upstream_sync.ps1 diff --git a/upstream_sync.ps1 b/upstream_sync.ps1 new file mode 100644 index 0000000..638e3da --- /dev/null +++ b/upstream_sync.ps1 @@ -0,0 +1,21 @@ +# Sync from upstream to your fork + +# Detect default branch (main/master/etc) +$branch = git symbolic-ref --short refs/remotes/origin/HEAD +$branch = $branch -replace "origin/", "" + +Write-Host "Default branch detected: $branch" -ForegroundColor Yellow + +Write-Host "Fetching upstream..." -ForegroundColor Cyan +git fetch upstream + +Write-Host "Checking out $branch..." -ForegroundColor Cyan +git checkout $branch + +Write-Host "Merging upstream/$branch..." -ForegroundColor Cyan +git merge upstream/$branch + +Write-Host "Pushing to origin..." -ForegroundColor Cyan +git push origin $branch + +Write-Host "✅ Sync complete!" -ForegroundColor Green