Skip to content

Instantly share code, notes, and snippets.

@tboztuna
Created July 23, 2016 23:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tboztuna/586d20c69edd551b537e543d1c487bc2 to your computer and use it in GitHub Desktop.
Save tboztuna/586d20c69edd551b537e543d1c487bc2 to your computer and use it in GitHub Desktop.
My useful shortcuts in ~/.bash_profile
# ----------------------
# Git Aliases
# ----------------------
# Thanks to Jonathan Suh
alias ga='git add'
alias gaa='git add .'
alias gaaa='git add -A'
alias gb='git branch'
alias gbd='git branch -d '
alias gc='git commit'
alias gcm='git commit -m'
alias gco='git checkout'
alias gcob='git checkout -b'
alias gcom='git checkout master'
alias gd='git diff'
alias gda='git diff HEAD'
alias gi='git init'
alias gl='git log'
alias glg='git log --graph --oneline --decorate --all'
alias gld='git log --pretty=format:"%h %ad %s" --date=short --all'
alias gm='git merge --no-ff'
alias gp='git pull'
alias gss='git status -s'
alias gst='git stash'
alias gstl='git stash list'
alias gstp='git stash pop'
alias gstd='git stash drop'
# ----------------------
# Git Functions
# ----------------------
# Git log find by commit message
function glf() { git log --all --grep="$1"; }
#in order to execute writing homestead instead of writing vagrant
export PATH=~/.composer/vendor/bin:$PATH
# Add Homebrew `/usr/local/bin` and User `~/bin` to the `$PATH`
PATH=/usr/local/bin:$PATH
PATH=$HOME/bin:$PATH
export PATH
# Load the shell dotfiles, and then some:
# * ~/.path can be used to extend `$PATH`.
# * ~/.extra can be used for other settings you don’t want to commit.
for file in ~/.{path,bash_prompt,exports,aliases,functions,extra}; do
[ -r "$file" ] && source "$file"
done
unset file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment