Dotfiles for my tiling window manager + terminal workflow.
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.

57 lines
1.3 KiB

  1. # Aliases {{{
  2. # . ~/.secure
  3. alias egc="vim -c \"set syn=gitcommit\" -c \"set tw=72\" commit-msg.txt"
  4. alias ga="git add -A * && gs"
  5. alias gac="git add -A *; git commit"
  6. alias gai="git add .gitignore"
  7. alias gc="git commit"
  8. alias gchom="git checkout master"
  9. alias gclear="git stash clear"
  10. alias gd="git diff -w"
  11. alias gdc="git diff --cached"
  12. alias gl="git log"
  13. alias gpl="git pull --rebase"
  14. alias gps="git push"
  15. alias grbc="git rebase --continue"
  16. alias gs="git status -u"
  17. alias gsl="git shortlog"
  18. alias gst="git stash"
  19. alias gstore="git config credential.helper store"
  20. alias gstp="git stash pop"
  21. alias vig="vi .gitignore"
  22. alias vir="vi README.md"
  23. alias crm="mrk README.md"
  24. gcm(){ git commit -m "$1" ; }
  25. # Aliases }}}
  26. # Functions {{{
  27. gcho() { git checkout $1 ; }
  28. gcln() { git clone $1 ; }
  29. gremotes() {
  30. git remote set-url --add --push origin $1
  31. git remote set-url --add --push origin $2
  32. }
  33. # gmrgr: merge repos {{{ #
  34. gmrgr() {
  35. # 1 = remote name, 2 = remote path
  36. git remote add $1 $2
  37. git fetch $1
  38. # whichever branch you want to merge
  39. git merge --allow-unrelated-histories $1/master
  40. git remote remove $1
  41. }
  42. # }}} merge repos #
  43. #
  44. gunc() { git update-index --assume-unchanged $1 ; }
  45. # pull all {{{ #
  46. gpla() {
  47. cmds="lc snp 9r sch"
  48. for cmd in $cmds; do
  49. eval $cmd && gst && gpl && gstp && gclear
  50. done
  51. }
  52. # }}} pull all #
  53. # Functions }}}