From 362f12fa3d384eac6f027bc53f505bba6664f67e Mon Sep 17 00:00:00 2001 From: Ulysia Date: Thu, 30 Jan 2025 05:58:11 +0100 Subject: [PATCH] additions --- setup-origins.sh | 2 -- setup.bat | 20 ++++++++++++++++++++ setup.sh | 18 ++++++++++++++++++ 3 files changed, 38 insertions(+), 2 deletions(-) delete mode 100755 setup-origins.sh create mode 100644 setup.bat create mode 100644 setup.sh diff --git a/setup-origins.sh b/setup-origins.sh deleted file mode 100755 index a14c993b7..000000000 --- a/setup-origins.sh +++ /dev/null @@ -1,2 +0,0 @@ -git remote add upstream https://github.com/Vendicated/Vencord.git -git remote set-url --pull upstream DISABLED diff --git a/setup.bat b/setup.bat new file mode 100644 index 000000000..6946db821 --- /dev/null +++ b/setup.bat @@ -0,0 +1,20 @@ +@echo off + +:: Check if 'upstream' remote exists +git remote | findstr upstream >nul +if errorlevel 1 ( + :: Add upstream remote + git remote add upstream https://github.com/Vendicated/Vencord.git + echo Added upstream remote +) + +:: Disable push to upstream by setting push URL to 'no_push' +git remote set-url --push upstream no_push +echo Disabled push to upstream remote + +:: Add alias for sync: fetch, merge, and push to origin +git config alias.sync "!git fetch upstream && git merge upstream/main && git push origin main" +echo Configured sync alias + +echo Setup completed! + diff --git a/setup.sh b/setup.sh new file mode 100644 index 000000000..692bbdf43 --- /dev/null +++ b/setup.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# Add upstream remote if it doesn't exist +if ! git remote | grep -q 'upstream'; then + git remote add upstream https://github.com/Vendicated/Vencord.git + echo "Added upstream remote" +fi + +# Disable push to upstream by removing its push URL +git remote set-url --push upstream no_push +echo "Disabled push to upstream remote" + +# Add alias for sync: fetch, merge, and push to origin +git config alias.sync '!git fetch upstream && git merge upstream/main && git push origin main' +echo "Configured sync alias" + +echo "Setup completed!" +