Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # .bash_aliases
- alias gb='git branch'
- alias gba='git branch -a'
- alias gc='git commit -v'
- alias gd='git diff | gvim -'
- alias gl='git pull'
- alias gp='git push'
- alias gst='git status'
- alias gk='gitk --all &'
- # .bashrc
- function parse_git_branch {
- git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
- }
- if [ "$color_prompt" = yes ]; then
- PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]$(parse_git_branch)\$ '
- else
- PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$(parse_git_branch)\$ '
- fi
- # Output example
- gawen@macub:~/forgetbox/.../src(dev)$ gst
- # On branch dev
- # Changes not staged for commit:
- # (use "git add/rm <file>..." to update what will be committed)
- # (use "git checkout -- <file>..." to discard changes in working directory)
- # ...
Add Comment
Please, Sign In to add comment