Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No branches exist in new GitLab project

Tags:

git

gitlab

I recently setup a new GitLab CE install for use in my office and every time I create a new project from the web UI it creates it completely empty, without any branches, including master. When a project has a master branch, I can go to commits > branches to create a new one. But the "Files" and "Commits" tabs don't exist in a completely virgin project.

The only way I've found to solve this is clone the repo locally, create a master branch, and then push that to the GitLab server.

But it would be really nice if it would just automatically create a master branch with no files (or maybe a .gitignore and README) by default, like GitHub does.

Is there a way to make it do this in GitLab?

I'm running the latest CE from the omnibus installer on CentOS 6.

like image 506
Adam Haile Avatar asked Sep 23 '14 21:09

Adam Haile


1 Answers

In the current GitLab CE (version 8) empty projects promt to add a REAMDE.md:

Create new file in empty GitLab repository

which includes the following URL (with domain, group, project of my project) for adding README:

https://domain.com/group/project/new/master?file_name=README.md

The master branch can be unprotected only after the branch is created.

like image 162
bastelflp Avatar answered Oct 12 '22 23:10

bastelflp