Skip to content

Instantly share code, notes, and snippets.

@jonchurch
Created July 24, 2023 18:44
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 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