Dotfiles, utilities, and other apparatus.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
1.7 KiB

  1. [alias]
  2. a = add
  3. amend = commit -a --amend
  4. br = branch
  5. c = commit
  6. changelog = log --date=short --pretty='format:%d %ad %s'
  7. ci = commit
  8. cm = commit -m
  9. co = checkout
  10. d = diff
  11. df = diff
  12. exec = "!exec "
  13. ec = !git edit-changed
  14. go = checkout
  15. l = log
  16. lg = log -p
  17. lol = log --graph --decorate --pretty=oneline --abbrev-commit
  18. lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
  19. log-notes = !git fetch origin refs/notes/review:refs/notes/review && git log --notes=review
  20. p = pull
  21. pul = pull
  22. root = rev-parse --show-toplevel
  23. s = status
  24. st = status
  25. stat = status
  26. sub = submodule
  27. push-gerrit = !git push origin HEAD:refs/for/${1:-`git rev-parse --abbrev-ref HEAD`}
  28. # TODO: add other team usernames:
  29. push-gerrit-tyler = !git push origin HEAD:refs/for/${1:-`git rev-parse --abbrev-ref HEAD`}%r=thcipriani
  30. push-gerrit-wip = !git push origin HEAD:refs/for/${1:-`git rev-parse --abbrev-ref HEAD`}%wip
  31. # Open changed files in tabs in vim (courtesy Dan Duvall):
  32. vim = "!vim -p $(git diff --name-only $@) #"
  33. # Handle accidentally typing git twice:
  34. git = !git
  35. [user]
  36. name = Brennen Bearnes
  37. email = code@p1k3.com
  38. [color]
  39. branch = auto
  40. diff = auto
  41. interactive = auto
  42. status = auto
  43. ui = auto
  44. [gui]
  45. [push]
  46. default = simple
  47. [credential]
  48. helper = gnome-keyring
  49. [status]
  50. submoduleSummary = true
  51. [gitreview]
  52. remote = origin
  53. username = brennen
  54. [commit]
  55. template = ~/cheatsheets/git-commit.txt
  56. [url "ssh://gerrit.wikimedia.org:29418"]
  57. pushInsteadOf = https://gerrit.wikimedia.org/r
  58. [rebase]
  59. autoStash = true
  60. [pull]
  61. rebase = true
  62. [init]
  63. defaultBranch = main
  64. [merge]
  65. # Via https://jvns.ca/blog/2024/02/16/popular-git-config-options/
  66. conflictstyle = zdiff3