Last active
December 22, 2016 16:37
-
-
Save jasonlcrane/d38a39275faedf0bc2360e7d1db7803d to your computer and use it in GitHub Desktop.
A collection of shortcuts from my bash profile
This file contains 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
# 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