Last active
February 22, 2022 18:28
-
-
Save HikaruYasuda/b7f7182596378d5c6a9b4918426e3766 to your computer and use it in GitHub Desktop.
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 | |
# $ echo '. ~/.git_alias' >> ~/.bash_profile | |
# $ echo 'alias ghelp="cat ~/.git_alias"' >> ~/.bash_profile | |
# $ source ~/.bash_profile | |
# ---------------------- | |
alias ga='git add' | |
alias gaa='git add .' | |
alias gaaa='git add -A' | |
alias gb='git branch -vv' | |
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 gcod='git checkout develop' | |
alias gd='git diff' | |
alias gda='git diff HEAD' | |
alias gf='git fetch -p' | |
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 gmr='git merge --no-ff --no-commit' | |
alias gp='git pull' | |
alias gpush='git push' | |
alias grh='git reset --hard' | |
alias gss='git status -s' | |
alias gst='git stash' | |
alias gstl='git stash list' | |
alias gstp='git stash pop' | |
alias gstd='git stash drop' | |
alias gcb='git rev-parse --abbrev-ref HEAD' | |
alias gback='gco $(gcb)' | |
alias gmd='gco develop; gp; gco $(gcb); git merge' | |
alias gpushf='gpush -u origin $(gcb)' | |
alias gbdgone='gb | grep '\'': gone] '\'' | awk '\''{print $1}'\'' | xargs git branch -d' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment