Skip to content

Instantly share code, notes, and snippets.

@epcim
Forked from lxhunter/merge.sh
Created June 15, 2018 06:40
Show Gist options
  • Save epcim/3d7fc0071d86da231615ef5f36d704b6 to your computer and use it in GitHub Desktop.
Save epcim/3d7fc0071d86da231615ef5f36d704b6 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 '[email protected]'
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://[email protected]/${TRAVIS_REPO_SLUG}.git master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment