Skip to content

Instantly share code, notes, and snippets.

@LiamPerson
Last active June 16, 2023 14:58
Show Gist options
  • Save LiamPerson/baef9cb938a147c62567e59b701d4110 to your computer and use it in GitHub Desktop.
Save LiamPerson/baef9cb938a147c62567e59b701d4110 to your computer and use it in GitHub Desktop.
My personal git config.
[filter "lfs"]
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
[core]
ignorecase = false
[alias]
find-merge = "!sh -c 'commit=$0 && branch=${1:-HEAD} && (git rev-list $commit..$branch --ancestry-path | cat -n; git rev-list $commit..$branch --first-parent | cat -n) | sort -k2 -s | uniq -f1 -d | sort -n | tail -1 | cut -f2'"
show-merge = "!sh -c 'merge=$(git find-merge $0 $1) && [ -n \"$merge\" ] && git show $merge'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment