Guest User

Untitled

a guest
Nov 17th, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.84 KB | None | 0 0
  1. # .bash_aliases
  2. alias gb='git branch'
  3. alias gba='git branch -a'
  4. alias gc='git commit -v'
  5. alias gd='git diff | gvim -'
  6. alias gl='git pull'
  7. alias gp='git push'
  8. alias gst='git status'
  9. alias gk='gitk --all &'
  10.  
  11. # .bashrc
  12. function parse_git_branch {
  13.   git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
  14. }
  15.  
  16. if [ "$color_prompt" = yes ]; then
  17.     PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]$(parse_git_branch)\$ '
  18. else
  19.     PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$(parse_git_branch)\$ '
  20. fi
  21.  
  22. # Output example
  23. gawen@macub:~/forgetbox/.../src(dev)$ gst
  24. # On branch dev
  25. # Changes not staged for commit:
  26. #   (use "git add/rm <file>..." to update what will be committed)
  27. #   (use "git checkout -- <file>..." to discard changes in working directory)
  28. # ...
Add Comment
Please, Sign In to add comment