Skip to content

Instantly share code, notes, and snippets.

@teldridge11
Created January 9, 2019 00:51
Show Gist options
  • Select an option

  • Save teldridge11/2ad5bb36d16026a2ba45876324711a17 to your computer and use it in GitHub Desktop.

Select an option

Save teldridge11/2ad5bb36d16026a2ba45876324711a17 to your computer and use it in GitHub Desktop.
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\u@\h \W\[\033[034m\]\$(parse_git_branch)\[\033[0m\] $ "
[alias]
co = checkout
br = branch
st = status
c = commit
cm = commit -m
ca = !git add -A && git commit -m
pl = pull
pf = push -f
po = "!git push -u origin \"$(git rev-parse --abrev-ref HEAD)\""
us = reset HEAD -- # unstage
rb = rebase
d = diff
uc = reset --soft HEAD~1 # undo last commit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment