Skip to content

Instantly share code, notes, and snippets.

@evg2108
Last active July 25, 2018 11:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evg2108/2341eefc7e782ef6efce82e17b968ee9 to your computer and use it in GitHub Desktop.
Save evg2108/2341eefc7e782ef6efce82e17b968ee9 to your computer and use it in GitHub Desktop.

Очистка локальных веток, которые уже былы смерджены в master или develop:

Нужнодобавить приведённый ниже алиас в конфиг гита git config -e --global:

[alias]
    cleanup = "!git branch --merged master | grep -v -P '^\\*|master|develop' | xargs -n1 -r git branch -d"

И затем можно вызывать команду git cleanup.

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