我在 Sourcetree 上使用 git 时遇到一个错误。
我创建了一个名为 sprints/Mycompany_sprint_1 的本地分支(因为我希望它在一个类别中),然后我从另一个分支中选择了多个樱桃。
之后,我尝试将所有更改推送到我的分支上,但我收到下一个错误:
The Remote branch '' (Local branch = 'sprints/Mycompany_sprint-1') is invalid. Ref names must follow git ref-format rules: https://www.kernel.org/pub/software/scm/git/docs/git-check-ref-format.html Completed with errors, see above.
但是,如果我转到链接,我将遵循(据我所知)所有规则,因为查看第一条规则:
They can include slash / for hierarchical (directory) grouping, but no slash-separated component can begin with a dot . or end with the sequence .lock.
我检查问题是否可能是 Spring 类别已经存在,但事实并非如此。
谁能告诉我我做错了什么,好吗?我害怕在这里看不到错误......
最佳答案
这似乎是一个影响 Windows 版本 3.3.4 的 SourceTree 的错误:https://jira.atlassian.com/browse/SRCTREEWIN-12593
在修复错误之前的解决方法是取消勾选并重新勾选推送对话框中的分支复选框。
关于git - 在 GIT 上推送更改时出错。引用名称必须遵循 git ref-format 规则,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58918906/