浏览代码

change the cleanup option to prune remotes

Sam Jaffe 3 年之前
父节点
当前提交
bcb69495ba
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      profile-git

+ 2 - 2
profile-git

@@ -27,6 +27,6 @@ git-create() {
 }
 
 alias git-graph="git log --graph --pretty=oneline --abbrev-commit --decorate --all"
-alias git-cleanup='git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d'
-
 alias git-history-graph="git log --graph --pretty='format:%C(auto)%h (%<(50,trunc)%s, %ad)%d' --abbrev-commit --decorate --all"
+
+alias git-cleanup='(git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d); (git fetch --prune 2>&1 | grep deleted | sed "s/.*-> origin\///" | xargs git branch -D)'