我第一次无法将代码推送到 GitLab。
我在 Web 界面上创建了一个 Gitlab 项目。
我创建了一个 ASP MVC 项目。
我在那个目录中做了“git init
”。
我添加了远程 origin
.
我添加并提交了更改,然后,当我想将更改推送到远程时,出现以下错误:
remote: A default branch (e.g. master) does not yet exist for
...
remote: Ask a project Owner or Maintainer to create a default branch:
...
error: failed to push some refs to
所以我想知道我是否可以创建一个角色为
Developer
的分支?如果是,如何创建默认分支?
如果不是,我的下一步应该是什么?
最佳答案
接下来是 issue 54155
It seems as though 'developer' should not be able to create projects if it does not have permission to then populate that project without asking an admin to intervene.
I don't understand, why I have enough permissions to create a project, but not to make it ready enough so I can push into it, and need to use another persons time in my organization to get ready to work.
IMHO it would be logical to either allow users with status developer to create a project in a way that it's ready to push code to - or just don't let developers create a project and tell them they have to ask a maintainer or owner.
Issue 51688提到:
Then I have to login with gitlab admin admin...Aggregate access to user test to test6.git as a
dev
ormaintainer
... and finally I can make push... But if usertest
creates another repo, I have to repeat all these steps again....Maintainer can create new branch. Please use maintainer account to push the new project.
But it doesn't make sense that a user has permissions to create empty repositories but not initialize a default branch or push to their newly created repository.
关于git - 如何在 GitLab 中创建默认分支?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60984084/