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.

55 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. gcm(){ git commit -m "$1" ; }
  23. # Aliases }}}
  24. # Functions {{{
  25. gcho() { git checkout $1 ; }
  26. gcln() { git clone $1 ; }
  27. gremotes() {
  28. git remote set-url --add --push origin $1
  29. git remote set-url --add --push origin $2
  30. }
  31. # gmrgr: merge repos {{{ #
  32. gmrgr() {
  33. # 1 = remote name, 2 = remote path
  34. git remote add $1 $2
  35. git fetch $1
  36. # whichever branch you want to merge
  37. git merge --allow-unrelated-histories $1/master
  38. git remote remove $1
  39. }
  40. # }}} merge repos #
  41. #
  42. gunc() { git update-index --assume-unchanged $1 ; }
  43. # pull all {{{ #
  44. gpla() {
  45. cmds="lc snp 9r sch"
  46. for cmd in $cmds; do
  47. eval $cmd && gst && gpl && gstp && gclear
  48. done
  49. }
  50. # }}} pull all #
  51. # Functions }}}