config 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. [user]
  2. name = Thomas Dy
  3. email = thatsmydoing@gmail.com
  4. [merge]
  5. conflictstyle = zdiff3
  6. [core]
  7. autocrlf = input
  8. hooksPath = ~/.config/git/hooks
  9. untrackedcache = true
  10. [delta]
  11. features = side-by-side line-numbers decorations
  12. whitespace-error-style = 22 reverse
  13. [delta "decorations"]
  14. commit-decoration-style = bold yellow box ul
  15. file-style = bold yellow ul
  16. file-decoration-style = none
  17. [color]
  18. ui = true
  19. [diff]
  20. algorithm = histogram
  21. [push]
  22. default = current
  23. [branch]
  24. # we use a hook to set this up instead
  25. autoSetupMerge = false
  26. sort = -committerdate
  27. [remote]
  28. pushDefault = origin
  29. [alias]
  30. root = !pwd
  31. lg = "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%C(bold blue)<%an>%Creset' --abbrev-commit"
  32. p = push
  33. pf = push --force-with-lease
  34. # history fast-forward (to push)
  35. hff = merge --ff-only @{push}
  36. # history reset hard (to push)
  37. hrh = reset --hard @{push}
  38. # head's history fast-forward (works even if a different branch is checked out)
  39. hhff = "!git push . $(git head)@{upstream}:$(git head)"
  40. # head's history reset hard
  41. hhrh = hhff --force
  42. # rebase upstream
  43. ru = rebase @{upstream}
  44. # rebase interactive upstream
  45. riu = rebase -i @{upstream}
  46. # rebase interactive autosquash upstream
  47. riau = rebase -i --autosquash @{upstream}
  48. # diff the rebase
  49. dr = range-diff @{u} @{1} @
  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)"
  55. # show/diff but with difftastic
  56. dshow = -c diff.external=difft show --ext-diff
  57. ddiff = -c diff.external=difft diff
  58. [include]
  59. path = ./config.local