Last active
December 25, 2017 03:24
-
-
Save sangpt/6d2181aef0cfc25c8be66d682be2c20c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# customize | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
export PS1="\[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ " | |
git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \1/' | |
} | |
alias tt='/var/toggle-touchpad' | |
alias r='rails' | |
alias gc='git commit -m' | |
alias gca='git add .;git commit --amend --no-edit' | |
alias gst='git status' | |
alias glo='git log --oneline' | |
alias gco='git checkout' | |
alias gcp='gca; git push -f origin $(git_branch)' | |
alias gpf='current=$(git_branch); git checkout develop; git pull framgia develop; git checkout $current' | |
alias grh='git reset --hard HEAD' | |
alias gpc='git push -f origin $(git_branch)' | |
alias gcam='git commit --amend' | |
alias gpfgrd='gpf; git rebase develop' | |
alias grd='git rebase develop' | |
alias ga='git add .' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Show git branch on terminal and alias some command