批量删除git远程分支命令
git branch -r | grep 'release' | sed 's/origin\///g' | xargs -I {} git push origin :{}
本地分支设置描述信息
git config branch.branch_name.description ‘描述信息’
查看本地某个分支描述信息
git config branch.branch_name.description
查看本地所有分支描述信息
git branch | xargs -tI {} git config branch.{}.description
ps: 在遍历到当前分支时候,git branch 会展示*,代表当前分支。所以该命令不会展示当前分支的描述信息。使用查看本地所有分支描述信息命令:git config branch.branch_name.description 查看即可。
或者使用sed 命令替换*为空。即使用以下命令:
git branch | sed 's/\*//g' | xargs -tI {} git config branch.{}.description