Skip to content

Commit

Permalink
3.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bugfish\bugfishtm committed Oct 21, 2024
1 parent 562ab6d commit 38425f7
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions update_repo.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
@echo off
:: Cool Output Messages
echo ==============================
echo Welcome to the Git Automation Script!
echo ==============================
echo This script will help you:
echo 1. Stage all changes (excluding this .bat file)
echo 2. Commit with a message of your choice
echo 3. Push the commit to the branch you specify
echo ==============================

:: Asking for the branch name
set /p branch=Enter the branch you want to push to (default is 'main'):

:: Set default branch to 'main' if no input is given
if "%branch%"=="" set branch=main

:: Asking for the commit message
set /p commitMsg=Enter your commit message:

:: Cool message before starting the Git commands
echo ==============================
echo Staging files (excluding the .bat file)...
echo ==============================

:: Staging all files except this .bat file
git add .

:: Cool message before committing
echo ==============================
echo Committing with message: "%commitMsg%"
echo ==============================

:: Committing the changes
git commit -m "%commitMsg%"

:: Cool message before pushing
echo ==============================
echo Pushing to branch: %branch%
echo ==============================

:: Pushing to the specified branch
git push -u origin %branch%

:: Completion message
echo ==============================
echo All done! Your changes have been pushed to the repository.
echo ==============================
pause

0 comments on commit 38425f7

Please sign in to comment.