我们每周召开一次集成 session ,审查未 merge 到 master 的分支中的代码。作为起点,我们使用它来列出打开的分支
git branch -a --no-merged master
我们以票号命名我们的分支机构,因此很难看出我们真正在看什么。我回来了
BUG_1231231
BUG_1412434
FEATURE_1231231
FEATURE_1232244
我知道我可以通过运行
来添加和查看描述
git branch --edit-description BUG_1231231
git config branch.BUG_1231231
问题是这些描述似乎存储在我本地存储库的配置中。这些描述可以推送到远程吗?
最佳答案
考虑到描述存储在配置文件中(这里是本地文件,在您的 Git 存储库中),那么,不,不会推送分支描述。
配置文件不会被推送(永远)。参见“Is it possible to clone git config from remote location?”
不过,简单的文本文件是 my initial answer for branch description recommended当时。
分支描述都是为了帮助发布有用的信息。
不是为了将该消息复制到其他不需要发布相同信息/提交的 repo 协议(protocol)上。
Using
branch.$name.description
as the configuration key, give users a place to write about what the purpose of the branch is and things like that, so that various subsystems, e.g. "push -s
", "request-pull
", and "format-patch --cover-letter
", can later be taught to use this information.
2020 年更新(8 年后):
philb提及 in the comments问题gitgitgadget/git
438关于“分支描述应该是可版本化的”。
philb 补充道:
If this is ever implemented, branch descriptions would be stored in refs and could then be pushed to a remote.
关于git - 将分支描述推送到远程,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10998142/