Skip to content

Instantly share code, notes, and snippets.

@jbollman7
Last active November 23, 2022 19:17
Show Gist options
  • Save jbollman7/1dd96d8328a5396030b31cfaba162404 to your computer and use it in GitHub Desktop.
Save jbollman7/1dd96d8328a5396030b31cfaba162404 to your computer and use it in GitHub Desktop.
Batch file to automaticaly sync your feature branch with the git main branch -
REM This is designed for WINDOWS
REM run win + r, type 'shell:startup'
REM put the contents of this file inside, with a .bat file extension
REM Change the mainb to whatever branch you want to pull changes from, ie themain branch
REM Change featureb to whatever branch you are working on, THAT you want to keep updated with the main branch
REM Change repo to the file directory with your git repository.
SET repo="C:\Repo\CucumberLibrary\"
SET mainb=integration_2.1
SET featureb=US365824_PPE_Lock_Workflow_Validations
REM No changes are needed below
cd %repo%
git checkout %mainb%
git pull
git checkout %featureb%
git merge %mainb%
timeout /t 10 /nobreak
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment