_git.rb 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. default['workstation']['_git']['hooksPath'] = '~/.git-templates/hooks'
  2. default['workstation']['_git']['scope']['system'] = {
  3. 'color.ui': true,
  4. 'color.diff': 'auto',
  5. 'color.status': 'auto',
  6. 'color.branch': 'auto',
  7. 'color.interactive': 'auto',
  8. 'status.submodulesummary': true,
  9. 'fetch.recursesubmodules': true,
  10. 'rebase.stat': true,
  11. 'help.autocorrect': '10',
  12. 'commit.verbose': true,
  13. 'alias.gol': %Q{log --graph --pretty=format:'%C(yellow)%h%C(green)%d%Creset %s %C(white) %an, %ar%Creset'},
  14. 'alias.commit': '--signoff',
  15. 'alias.com': 'commit --signoff',
  16. 'alias.coma': 'commit --signoff --amend',
  17. 'alias.push': '--verbose --tags',
  18. 'alias.pull': '--verbose',
  19. 'alias.co': 'checkout',
  20. 'alias.br': 'branch --all --verbose',
  21. 'alias.s': 'status --short --branch',
  22. 'include.path': '~/.gitconfig',
  23. 'user.email': "jeremy@#{node['hostname']}",
  24. 'user.name': 'Jeremy from WSL2',
  25. 'pull.rebase': 'preserve',
  26. 'core.hooksPath': node['workstation']['_git']['hooksPath'],
  27. }
  28. # We don't use hash because keys such as "includeif.gitdir" are not uniq
  29. default['workstation']['_git']['scope']['global'] = {
  30. 'core.sshcommand': '/usr/sbin/ssh-ident',
  31. 'user.email': 'jeremy.mauro@gmail.com',
  32. 'user.name': 'Jeremy MAURO',
  33. 'includeif.gitdir:~/repo/aviatrix/.path': '~/.gitconfig-work',
  34. 'includeif.gitdir:~/repo/personal/.path': '~/.gitconfig-personal',
  35. 'url.git@github.com': '.insteadof=https://github.com/',
  36. }
  37. default['workstation']['_git']['file_~/.gitconfig-personal'] = {
  38. 'user.email': 'jeremy.mauro@gmail.com',
  39. 'user.name': 'Jeremy MAURO',
  40. 'user.signingkey': 'FA2D8E280A6DD533',
  41. }
  42. default['workstation']['_git']['scope']['file_~/.gitconfig-work'] = {
  43. 'user.email': 'jmauro@aviatrix.com',
  44. 'user.name': 'Jeremy MAURO',
  45. }