Skip to content

Instantly share code, notes, and snippets.

@jsmrcaga
Created December 13, 2016 13:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jsmrcaga/eb3bf9afeb20e79416e903b838159903 to your computer and use it in GitHub Desktop.
Save jsmrcaga/eb3bf9afeb20e79416e903b838159903 to your computer and use it in GitHub Desktop.
Command to auto rebase a branch from another.
[alias]
magic = "!sh -c 'git checkout \"$1\" && git pull && git checkout \"$0\" && git rebase \"$1\"'"
@jsmrcaga
Copy link
Author

to use as:
git magic current-branch master-branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment