Skip to content

Instantly share code, notes, and snippets.

@jonchurch
Created July 24, 2023 18:44
Show Gist options
  • Save jonchurch/a64b7ed735d2e2e4d5e166c5e0a7e182 to your computer and use it in GitHub Desktop.
Save jonchurch/a64b7ed735d2e2e4d5e166c5e0a7e182 to your computer and use it in GitHub Desktop.
git aliases
[alias]
root = rev-parse --show-toplevel
pr = "!f() { git fetch -fu ${2:-upstream} refs/pull/$1/head:pr/$1 && git checkout pr/$1; }; f"
conflicts = diff --name-only --diff-filter=U
fix = "!f() { ${EDITOR} `git conflicts`; }; f"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment