Advertisement
Guest User

Untitled

a guest
May 10th, 2017
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 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. r = log --date=local --pretty=format:\"[%h] %ad (%ar): %n%C(yellow)%s%C(reset) %n%b\"
  12. c = log --date=local --pretty=format:\"%C(red)%ad%C(reset)%n%C(yellow)%s%C(reset) %n%b %n\"
  13. s = log --date=short --pretty=format:\"%ad %s\"
  14. n = commit --allow-empty
  15. q = commit --allow-empty -m
  16. u = commit --allow-empty --amend
  17. """ >> .git/config
  18.  
  19. # Now you can add a quick entry
  20.  
  21. git q "This is a short one line entry"
  22.  
  23. # A longer one entry that opens in your $EDITOR
  24. git n
  25.  
  26. # View your entries
  27. git c
  28. git s
  29. git r
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement