Advertisement
Guest User

git diary

a guest
May 11th, 2017
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.90 KB | None | 0 0
  1. # Make sure EDITOR is set
  2. export EDITOR=vim
  3.  
  4. mkdir diary
  5. cd diary
  6. git init
  7.  
  8. # this installs shortcuts for creating a diary
  9. echo """
  10. [alias]
  11.     full = log --date=local --pretty=format:\"[%h] %ad (%ar): %n%n%C(yellow)%w(80, 2, 2)%s%C(reset) %w(0, 2, 2)%n%b%n\"
  12.  neat = log --date=local --pretty=format:\"%C(red)%ad%C(reset)%n%w(80, 2, 2)%C(yellow)%s%C(reset) %n%w(0, 2, 2)%b %n\"
  13.  stream = log --date=local --pretty=format:\"%w(0, 2, 2)%n%<(18)%C(magenta)%ar%C(reset)%w(89, 0, 20)%C(bold yellow)%s%C(reset)%n%n%b%n\"
  14.     new = commit --allow-empty
  15.     quick = commit --allow-empty -m
  16.     u = commit --allow-empty --amend
  17.  de = reset HEAD~1
  18. """ >> .git/config
  19.  
  20. # Now you can add a quick entry
  21.  
  22. git quick "This is a short one line entry"
  23.  
  24. # A longer one entry that opens in your $EDITOR
  25. git new
  26.  
  27. # View your entries
  28. git stream
  29. git full
  30. git neat
  31.  
  32. # To delete last entry
  33. git de
  34.  
  35. # To edit last entry
  36. git u
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement