Skip to content

Instantly share code, notes, and snippets.

@jsmrcaga jsmrcaga/Git Magic

Created Dec 13, 2016
Embed
What would you like to do?
Command to auto rebase a branch from another.
[alias]
magic = "!sh -c 'git checkout \"$1\" && git pull && git checkout \"$0\" && git rebase \"$1\"'"
@jsmrcaga

This comment has been minimized.

Copy link
Owner Author

jsmrcaga commented Dec 13, 2016

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
You can’t perform that action at this time.