Skip to content

Instantly share code, notes, and snippets.

@The-Doggy
The-Doggy / merge.sh
Created April 27, 2020 11:04 — forked from lxhunter/merge.sh
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