The most important of things.
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.

.gitconfig 2.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. [user]
  2. email = zah@andrewzah.com
  3. name = Andrew Zah
  4. signingkey = 5EB70FAA
  5. [core]
  6. editor = nvim
  7. excludesfile = ~/.global_gitignore
  8. [alias]
  9. aliases = !git config --list | grep 'alias\\.' | sed 's/alias\\.\\([^=]*\\)=\\(.*\\)/\\1\\ \t => \\2/' | sort
  10. # git add --all
  11. aa = add --all
  12. # delete branch
  13. brdel = branch -D
  14. # most modified files
  15. churn = !git log --all -M -C --name-only --format='format:' "$@" | sort | grep -v '^$' | uniq -c | sort | awk 'BEGIN {print "count,file"} {print $1 "," $2}'
  16. # save repo as tarball
  17. export = archive -o latest.tar.gz -9 --prefix=latest/
  18. # list of commit sha-1s
  19. l = "!f() { git log $* | grep '^commit ' | cut -f 2 -d ' '; }; f"
  20. # list all tags
  21. tags = tag -l
  22. # checks that local refs are up to date before overwriting
  23. please = push --force-with-lease
  24. # see recent branches worked on
  25. recent = for-each-ref --count=10 --sort=-committerdate refs/heads/ --format="%(refname:short)"
  26. # see overview of commits
  27. overview = log --all --oneline --no-merges
  28. # recap your own commits on a project
  29. recap = log --all --pretty=format:'%h %ad %s' --no-merges --author=<zah@andrewzah.com> --date=short
  30. # amend commit
  31. commend = commit --amend --no-edit
  32. # merge no fast forward
  33. merc = merge --no-ff
  34. # brief status
  35. st = status --short --branch
  36. # stash only unstaged changes to tracked files
  37. stsh = stash --keep-index
  38. # stash any changes to tracked files
  39. staash = stash --include-untracked
  40. # stash ignored, untracked, and tracked files
  41. staaash = stash --all
  42. # initialize empty repo and commit
  43. it = !git init && git commit -m \"root\" --allow-empty }
  44. [diff]
  45. indentHeuristic = on
  46. [log]
  47. date = relative
  48. [color]
  49. ui = true
  50. [color "branch"]
  51. current = yellow reverse
  52. local = yellow
  53. remote = green
  54. [color "diff"]
  55. meta = yellow
  56. frag = magenta
  57. old = red
  58. new = green
  59. [color "status"]
  60. added = yellow
  61. changed = green
  62. untracked = red
  63. [commit]
  64. gpgsign = true
  65. # shorthand URLs
  66. [url "https://github.com/"]
  67. insteadOf = gh:
  68. [url "git@github.com:"]
  69. insteadOf = ghs:
  70. [url "https://gist.github.com/"]
  71. insteadOf = gist:
  72. [url "https://gitlab.com/"]
  73. insteadOf = gl:
  74. [url "git@gitlab.com:"]
  75. insteadOf = gls:
  76. [init]
  77. templatedir = ~/.config/git/templates/init