Last active
August 29, 2015 14:00
-
-
Save saboyutaka/11034965 to your computer and use it in GitHub Desktop.
ぼくのさいきょうのgit alias
This file contains hidden or 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
# most useful aliases | |
alias ga='git add' | |
alias gb='git branch' | |
alias gc='git checkout' | |
alias gg=display_git_branch_and_wip_files | |
alias gcm='gc master' | |
alias gd='git diff' | |
alias gdc='git diff --cached' | |
alias gpoc='git push origin `gitcurrentbranch`' | |
alias gwip='git commit -m '\''WIP'\' | |
alias gempty='git commit --allow-empty --message "empty commit"' | |
alias grh='git reset HEAD' | |
alias 'grh^'='git reset HEAD^' | |
alias g=git | |
alias gbd_merged='git branch --merged | grep -v '\''^\*'\'' | grep -v '\''^ master$'\'' | grep -v '\''^ develop$'\'' | xargs git branch -d' | |
alias gcd='gc develop' | |
alias gcp='gc -' | |
alias gdd='git diff develop..HEAD' | |
alias gddn='git diff develop..HEAD --name-only' | |
alias gdm='git diff master..HEAD' | |
alias gdmn='git diff master..HEAD --name-only' | |
alias git_latest_tag='git describe --tags $(git rev-list --tags --max-count=1)' | |
alias gitcurrentbranch='git rev-parse --abbrev-ref HEAD' | |
alias gitlocalignore='git update-index --assume-unchanged' | |
alias gitlocalignorereset='git update-index --no-assume-unchanged' | |
alias gl='git log' | |
alias gld='git log develop..HEAD' | |
alias gldo='git log develop..HEAD --oneline' | |
alias glf='git log --follow' | |
alias glg='git log --graph --pretty=oneline --abbrev-commit' | |
alias glone='git log --pretty=oneline' | |
alias gmpr=git_log_after_latest_mpr | |
alias gmt='git mergetool' | |
alias gpo='git push origin' | |
alias gpr='git pull --rebase;gbd_merged' | |
alias grc='git rebase --continue' | |
alias grpo='git remote prune origin' | |
alias gs='git stash' | |
alias gsl='git stash list' | |
alias gsp='git stash pop' | |
git_log_after_latest_mpr () { | |
git log `git_latest_tag`..origin/master --oneline --grep 'Merge pull request' | |
} | |
display_git_branch_and_wip_files () { | |
echo "${fg[blue]}######################################$reset_color" | |
git branch | |
echo "${fg[yellow]}######################################$reset_color" | |
git status | |
echo "${fg[blue]}######################################$reset_color" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment