config 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. [user]
  2. name = Thomas Dy
  3. email = thatsmydoing@gmail.com
  4. [merge]
  5. conflictstyle = diff3
  6. [core]
  7. autocrlf = input
  8. hooksPath = ~/.config/git/hooks
  9. [delta]
  10. features = side-by-side line-numbers decorations
  11. whitespace-error-style = 22 reverse
  12. [delta "decorations"]
  13. commit-decoration-style = bold yellow box ul
  14. file-style = bold yellow ul
  15. file-decoration-style = none
  16. [color]
  17. ui = true
  18. [diff]
  19. algorithm = patience
  20. [difftool]
  21. prompt = false
  22. [difftool "difft"]
  23. cmd = difft "$LOCAL" "$REMOTE"
  24. [push]
  25. default = current
  26. [branch]
  27. # we use a hook to set this up instead
  28. autoSetupMerge = false
  29. [remote]
  30. pushDefault = origin
  31. [alias]
  32. root = !pwd
  33. lg = "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%C(bold blue)<%an>%Creset' --abbrev-commit"
  34. p = push
  35. pf = push --force-with-lease
  36. # history fast-forward (to push)
  37. hff = merge --ff-only @{push}
  38. # history reset hard (to push)
  39. hrh = reset --hard @{push}
  40. # head's history fast-forward (works even if a different branch is checked out)
  41. hhff = "!git push . $(git head)@{upstream}:$(git head)"
  42. # head's history reset hard
  43. hhrh = hhff --force
  44. # rebase upstream
  45. ru = rebase @{upstream}
  46. # rebase interactive upstream
  47. riu = rebase -i @{upstream}
  48. # rebase interactive autosquash upstream
  49. riau = rebase -i --autosquash @{upstream}
  50. ca = commit --amend
  51. smash = "!git add -u && git ca --no-edit && git pf"
  52. reset-head = remote set-head origin -a
  53. head = for-each-ref --format="%(symref:lstrip=-1)" refs/remotes/origin/HEAD
  54. sh = "!git switch $(git head)"