Skip to content

Instantly share code, notes, and snippets.

@The-Doggy
Forked from lxhunter/merge.sh
Created April 27, 2020 11:04
Show Gist options
  • Select an option

  • Save The-Doggy/b448b0ebb5f7c864373173431eca4947 to your computer and use it in GitHub Desktop.

Select an option

Save The-Doggy/b448b0ebb5f7c864373173431eca4947 to your computer and use it in GitHub Desktop.
Automated merging of branches into master for travis-ci or any other ci
#!/bin/bash
git config --global user.email 'travis@travis-ci.org'
git config --global user.name 'Travis'
git remote set-branches --add origin master
git fetch
git reset --hard
git checkout master
git merge --ff-only "$TRAVIS_COMMIT"
git push git+ssh://git@github.com/${TRAVIS_REPO_SLUG}.git master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment