Skip to content

Instantly share code, notes, and snippets.

@safor
Created November 17, 2021 11:07
Show Gist options
  • Save safor/5a6f39665c824d7f6c60be28d98f556d to your computer and use it in GitHub Desktop.
Save safor/5a6f39665c824d7f6c60be28d98f556d to your computer and use it in GitHub Desktop.
git config --get-regexp alias
git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.ci commit
git config --global alias.st status
git config --global alias.unstage "reset HEAD --"
git config --global alias.lg "log --graph --oneline --decorate"
git config --global alias.last "log -1 HEAD"
git config --global alias.br-cleanup "!f() { git checkout --quiet master && git branch --merged | grep --invert-match '\\*' | xargs -n 1 git branch --delete; git checkout --quiet @{-1}; }; f"
git config --global alias.alias "! git config --get-regexp ^alias\. | sed -e s/^alias\.// -e s/\ /\ =\ /"
git alias
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment