Skip to content

Instantly share code, notes, and snippets.

@TimDorand
Created June 3, 2020 09:27
Show Gist options
  • Save TimDorand/0a0f6deddc88a4795dde6799723b673b to your computer and use it in GitHub Desktop.
Save TimDorand/0a0f6deddc88a4795dde6799723b673b to your computer and use it in GitHub Desktop.
Ultimate Rebase And Push Executable. Takes the current branch in first param.
#!/bin/bash
echo "$(tput setaf 3)Rebasing branch $1 with develop and pushing $(tput sgr0)
"
git stash && git checkout develop && git pull --rebase && git checkout $1 && git rebase origin/develop && git push -f origin $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment