Last active
February 1, 2018 00:00
-
-
Save dgonzo/1d08e4bfcfa08aad0a895015a779bb85 to your computer and use it in GitHub Desktop.
helpful git aliases
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
# Helpful git aliases | |
# you can either add them one by one https://git-scm.com/book/en/v2/Git-Basics-Git-Aliases | |
# or format as you see them in ~/.gitconfig | |
alias.br=branch | |
alias.cb=checkout -B | |
alias.co=checkout | |
alias.lg=log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative | |
alias.lp=log -p -1 | |
alias.mg=merge --no-ff | |
alias.spull=!git pull && git submodule sync --recursive && git submodule update --init --recursive | |
alias.spush=push --recurse-submodules=on-demand | |
alias.squash=rebase --interactive HEAD~ | |
alias.srebase=submodule update --remote --rebase -- . | |
alias.st=status | |
alias.summary=log --prettty=format:'[%h] %an %ar: %s' --stat | |
alias.supdate=submodule update --init --recursive | |
alias.tidy=rebase -i @{u} | |
# Helpful Bash aliases | |
# put these in .bashrc or in a .bash_aliases file | |
# if you put them into .bash_aliases make sure you "source" them in .bashrc | |
# load aliases on source | |
# if [ -f ~/.bash_aliases ]; | |
# then | |
# . ~/.bash_aliases | |
# fi | |
alias clean-dangling='docker rmi $(docker images -f dangling=true -q)' | |
alias clean-stopped='docker rm -v $(docker ps -a -q -f status=exited)' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment