git - Limit remote branch decorations but keep HEAD decoration
问题描述
I would like to decorate my git log with all local branches and a small number of remote branches whose names I know, while ignoring all other remote branches.
The remote branches I want to decorate follow a bit of a naming pattern (they all start with a certain prefix like develop/), and I initially used
git log --decorate-refs=heads --decorate-refs=remotes/origin/develop/*
Which worked, but git log would no longer decorate HEAD. Is there a way to explicitly tell git log to decorate HEAD?
Next, I tried to come up with a exclusion rule solution using glob patterns, but this is the best I could get to work:
git log --decorate-refs-exclude="remotes/origin/[!d]*"
Now HEAD is decorated, but the rule only excludes remote branches that do not start with d. I was unable to make a glob pattern that would exclude all remote branches that don't start with develop/. Is this possible, without excluding HEAD?
解决方案
推荐阅读
- javascript - 带有媒体查询的 Javascript 菜单切换
- graphql - GraphQL SPQR:id 不应在创建时显示
- android - 使用最新的 gradle 版本 3.2.1 时找不到源 java 类
- .htaccess - 如何使用 htaccess 根据其分段重定向 URL?
- r - 将(有序)因子映射到ggplot中的颜色
- haskell - toJson 实例单值
- rdbms - 如何设置 Apache Sling 以使用关系数据库
- jquery - 如何让动画倒退
- wpf - 为什么不能用children 克隆Grid?
- excel - 匹配一个值并用 2 张纸返回下面的单元格