Skip to content

Instantly share code, notes, and snippets.

@samiron
Last active November 15, 2017 07:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samiron/14465abeb65f0aaedb61f7206e69b389 to your computer and use it in GitHub Desktop.
Save samiron/14465abeb65f0aaedb61f7206e69b389 to your computer and use it in GitHub Desktop.
Personal bashrc file contains general utility. Will grow over time.
alias gs="git status"
function gds(){
git diff --color=always --staged "$@" | less -rS
}
function gd(){
git diff --color=always "$@" | less -rS
}
function gau(){
git add -u
}
function confirm() {
read -r -p "${1:-Are you sure? [y/N]} " response
case "$response" in
[yY][eE][sS]|[yY])
true
;;
*)
false
;;
esac
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment