Skip to content

Instantly share code, notes, and snippets.

@jasonlcrane
Last active December 22, 2016 16:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasonlcrane/d38a39275faedf0bc2360e7d1db7803d to your computer and use it in GitHub Desktop.
Save jasonlcrane/d38a39275faedf0bc2360e7d1db7803d to your computer and use it in GitHub Desktop.
A collection of shortcuts from my bash profile
# GIT ALIASES
alias s="git status"
alias aa="git add ."
alias log="git log"
alias glog="git log --pretty=format:'%Cred%h%Creset -%Creset %s %Cgreen(%ai) %C(bold blue)<%an>%Creset'"
alias pulld="git pull origin development"
alias pushd="git push origin development"
alias pullm="git pull origin master"
alias pushm="git push origin master"
alias merged="git merge development"
alias checkd="git checkout development"
alias checkm="git checkout master"
alias gitd="git diff"
# DEV ALIASES
alias vbash="vi ~/.bash_profile"
alias sbash="source ~/.bash_profile"
# Usage: `pick {SHA-1}` where SHA-1 is the commit hash you want to pick from another branch to your current branch
function pick {
git cherry-pick $1
}
# Usage: `co master` checks out master branch
function co {
git checkout $1
}
# Usage: `ignore .idea` adds .idea to project's gitignore file
function ignore {
echo -e '\n'$1 >> .gitignore
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment