Skip to content

Instantly share code, notes, and snippets.

@ghaake
Created May 21, 2019 19:42
Show Gist options
  • Save ghaake/f8091aef43579c415a19ad0dac8c1a1f to your computer and use it in GitHub Desktop.
Save ghaake/f8091aef43579c415a19ad0dac8c1a1f to your computer and use it in GitHub Desktop.
Usefull alias git commands for lazy shell users
git config --global alias.co checkout
git config --global alias.ci commit
git config --global alias.st status
git config --global alias.br branch
git config --global alias.ba "branch -a"
git config --global alias.bl "branch -l"
git config --global alias.hist "log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short"
@ghaake
Copy link
Author

ghaake commented May 16, 2022

git config --global alias.sweep=!git branch --merged $([[ $1 != \"-f\" ]] [\\\n&&](file:///n&&) git rev-parse master) | egrep -v \"(^\\*|^\\s*(main|release|master|develop)$)\" [\\\n|](file:///n:/) xargs git branch -d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment