Skip to content

Instantly share code, notes, and snippets.

@wescosta
Created January 16, 2019 18:42
Show Gist options
  • Save wescosta/05184740694bcaef624931f10e7af9c2 to your computer and use it in GitHub Desktop.
Save wescosta/05184740694bcaef624931f10e7af9c2 to your computer and use it in GitHub Desktop.
Git rebase current branch
#!/bin/bash
function rebase () {
branch=git branch | grep \* | cut -d ' ' -f2;
git checkout master;
git pull origin master;
git checkout $branch;
git rebase master $branch;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment