Created
February 20, 2018 21:09
-
-
Save jklue/e1d462c554e340e392f3b7269f00b412 to your computer and use it in GitHub Desktop.
pretty bash
This file contains hidden or 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
# prompt | |
function parse_git_branch () { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
RED="\[\033[0;31m\]" | |
YELLOW="\[\033[0;33m\]" | |
GREEN="\033[0;32m" | |
NO_COLOR="\[\033[0m\]" | |
NC="\033[0m" | |
PS1="\[\e[36;1m\]\w \[\e[00m\]$YELLOW\$(parse_git_branch)$NO_COLOR\$ " | |
# helpers | |
alias ll="ls -lahG" | |
# git | |
alias gitconfig="subl .git/config" | |
alias status="git status" | |
alias add="git add --all" | |
alias commit="git commit -m" | |
alias push="git push" | |
alias initialpush="git push --set-upstream origin master" | |
alias pull="git pull" | |
alias branch="git branch" | |
alias b="git branch" | |
alias s="status" | |
function sg() { | |
git add . | |
git commit -a -m "$1" | |
git push | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment