Skip to content

Instantly share code, notes, and snippets.

@antonkomarev
Last active June 20, 2020 20:52
Show Gist options
  • Save antonkomarev/11bb72836a6f2ca8f100ba079d09e9ca to your computer and use it in GitHub Desktop.
Save antonkomarev/11bb72836a6f2ca8f100ba079d09e9ca to your computer and use it in GitHub Desktop.
Git configuration
[core]
excludesfile = ~/.gitignore
[alias]
current-hash = "rev-parse HEAD"
current-branch = "rev-parse --abbrev-ref HEAD"
clean-up = "!git fetch -p && git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -D"
go = "!git checkout ${1:-master} && git pull && git clean-up"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment