Skip to content

Instantly share code, notes, and snippets.

@stykalin
Created June 17, 2022 05:39
Show Gist options
  • Save stykalin/702d47e71249afa68fdf69282bce1fdc to your computer and use it in GitHub Desktop.
Save stykalin/702d47e71249afa68fdf69282bce1fdc to your computer and use it in GitHub Desktop.
Script for auto-merging on CI from one branch (e.g. env1) to another branch (e.g. env2)
# Script for auto-merging on CI from one branch (e.g. env1) to another branch (e.g. env2).
# Usefull when you run the code from different branches on different environments.
# Assume that main developing environment is env1
# and for env2 the code should moustly the same, ecxept some minor parts, specific for env2.
# CI checkout the default branch (e.g. env1)
git checkout -B env2
git pull --no-edit
git merge env1
git push -u origin env2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment