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.

122 lines
2.6 KiB

  1. # vim: set sw=2 sts=2 ts=2 noexpandtab :
  2. [color]
  3. ui = auto
  4. branch = auto
  5. diff = auto
  6. grep = auto
  7. interactive = auto
  8. status = auto
  9. [user]
  10. email = info@wpstudio.ru
  11. name = WP Studio
  12. [core]
  13. autocrlf = false
  14. excludesfile = ~/.gitignore_global
  15. whitespace = blank-at-eol,blank-at-eof,space-before-tab
  16. [push]
  17. default = simple
  18. [rerere]
  19. enabled = true
  20. autoupdate = true
  21. [rebase]
  22. # Automatically stash before a rebase and unstash afterwards.
  23. autoStash = true
  24. [commit]
  25. # Show diff when preparing commit message
  26. verbose = true
  27. template = ~/.gitmessage
  28. [alias]
  29. a = add
  30. s = status
  31. st = status
  32. ci = commit
  33. b = branch
  34. co = checkout
  35. re = remote
  36. d = diff
  37. dc = diff --cached
  38. lol = log --graph --decorate --pretty=oneline --abbrev-commit
  39. lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
  40. ls = ls-files
  41. lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
  42. lgi = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%ci) %C(bold blue)<%an>%Creset' --abbrev-commit
  43. # Pull Upstream
  44. pu = !"git fetch origin -v; git fetch upstream -v; git merge upstream/master"
  45. # Commit Amend Reuse Message HEAD
  46. carmh = commit --amend --reuse-message=HEAD
  47. # Push Current
  48. pc = !"f() { remote=\"${1:-origin}\"; git push -u \"$remote\" $(git rev-parse --abbrev-ref HEAD); }; f"
  49. # Push Current Force
  50. pcf = !"f() { echo git pc \"$@\" -f; }; f"
  51. # Mainly for YADM
  52. untracked = !"f() { git status --porcelain=v1 -zunormal | xargs -0n1 printf \"%s\\n\" | grep -E '^\\?\\? \\.' | cut -c4-; }; f"
  53. # Current branch
  54. current = rev-parse --abbrev-ref HEAD
  55. cof = !git for-each-ref --format='%(refname:short)' refs/heads | fzf | xargs git checkout
  56. [merge]
  57. tool = vimdiff
  58. conflictstyle = diff3
  59. [mergetool]
  60. prompt = false
  61. keepBackup = false
  62. [mergetool "vimdiff"]
  63. cmd = nvim -d $BASE $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J'
  64. ###
  65. ### Git-up specific
  66. ### https://github.com/aanand/git-up
  67. ###
  68. [git-up "rebase"]
  69. arguments = --preserve-merges
  70. ###
  71. ### Github specific
  72. ###
  73. [github]
  74. user = dimti
  75. # read from given uri
  76. # push to writable one
  77. # http://bit.ly/g9c9Y2
  78. #
  79. [url "http://github.com/"]
  80. insteadOf = "gh:"
  81. [url "git@github.com:"]
  82. pushInsteadOf = "https://github.com/"
  83. pushInsteadOf = "http://github.com/"
  84. pushInsteadOf = "gh:"
  85. [credential]
  86. helper = "cache --timeout 86400"
  87. [pack]
  88. threads = 2
  89. ###
  90. ### Include local overrides
  91. ###
  92. [include]
  93. path = .gitconfig.local
  94. [pull]
  95. rebase = true
  96. [lfs]
  97. fetchexclude = *
  98. [filter "lfs"]
  99. clean = git-lfs clean -- %f
  100. smudge = git-lfs smudge -- %f
  101. process = git-lfs filter-process
  102. required = true