Last active
June 16, 2017 10:43
-
-
Save kormat/2bd88d965497bc54c988 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
COLOR=$(tput setaf 12) | |
RESET=$(tput sgr0) | |
log() { | |
echo "$COLOR=======> $@ $RESET" | |
} | |
log "Switching to master branch" | |
git checkout master | |
log "Fetching upstream" | |
git fetch --prune --multiple upstream origin | |
log "Updating master" | |
git merge --ff-only upstream/master master | |
git push | |
log "Merged branches:" | |
git branch --merged | |
log "Done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment