Advertisement
maurobaraldi

.gitconfig

Jul 11th, 2013
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.15 KB | None | 0 0
  1. [core]
  2. excludesfile = ~/.gitignore
  3. autocrlf = input
  4. editor = vim # If you uses emacs, you are poser!!
  5. pager = less -R
  6.  
  7. [user]
  8. name = Mauro Baraldi
  9. email = mauro.baraldi@gmail.com
  10.  
  11. [color]
  12. branch = auto
  13. diff = auto
  14. status = auto
  15. interactive = auto
  16.  
  17. [color "branch"]
  18. current = yellow
  19. local = blue
  20. remote = green
  21.  
  22. [color "diff"]
  23. meta = yellow bold
  24. frag = magenta bold
  25. old = red bold
  26. new = green bold
  27.  
  28. [diff]
  29. external = /home/mauro/.hooks/diff.py
  30.  
  31. [github]
  32. user = maurobaraldi
  33.  
  34. [status]
  35. showUntrackedFiles = no
  36.  
  37. [alias]
  38. # Basics
  39. a = add
  40. b = branch
  41. c = commit
  42. d = diff
  43. f = fetch
  44. l = log
  45. m = merge
  46. o = checkout
  47. p = pull
  48. ps = push
  49. r = reset
  50. s = status
  51.  
  52. # == Sugar Sintaxes ==
  53.  
  54. # branch
  55. branches = branch -a # List all branches (local + remotes)
  56.  
  57. # log
  58. activity = log --oneline --graph --decorate # Show activity (log) most like gitk deafult view
  59. history = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --
  60. unadd = git reset HEAD # remove a file from index
  61. what = "!f() { git log --author=$1; }; f" # Show what was done by user
  62. between = "!f() { git log --since=$1 --until=$2; }; f" # Show what was done by range date
  63. files = "!f() { git diff-tree --no-commit-id --name-only -r $1; }; f" # Show files changed in a given commit
  64.  
  65. whatis = show -s --pretty='tformat:%h (%s, %ad)' --date=short
  66. whois = "!sh -c 'git log -i -1 --pretty=\"format:%an <%ae>\n\" --author=\"$1\"' -"
  67. tagit = "!f() { git tag $(date +'%Y%m%d_%H%M'); }; f"
  68. goodmorning = "!sh -c 'git checkout develop; git pull; make'"
  69. merged = branch -a --merged # Show merged branchs (remote/local)
  70. unmerged = branch -a --no-merged # Show unmerged branchs (remote/local)
  71. diffs = "!for i in `git diff --name-only`; do git diff $i; done"
  72. checkallout = "!for i in `git diff --name-only`; do git checkout $i; done"
  73. sync = "!git pull && git push"
  74. cam = commit -am
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement