Skip to content

Instantly share code, notes, and snippets.

@drewdaemon
Created July 10, 2019 17:59
Show Gist options
  • Save drewdaemon/026d99f672e0b45d75f0b001978783f4 to your computer and use it in GitHub Desktop.
Save drewdaemon/026d99f672e0b45d75f0b001978783f4 to your computer and use it in GitHub Desktop.
Helpful aliases for merging/rebasing off master
[alias]
pmerge = "!f() { git fetch origin \"$1\":\"$1\" && git merge \"$1\"; }; f"
pbase = "!f() { git fetch origin \"$1\":\"$1\" && git rebase \"$1\"; }; f"
@drewdaemon
Copy link
Author

Use git pmerge <branch-name> to pull the branch and merge it into the current branch.
Use git pbase <branch-name> to pull the branch and rebase against it.

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