When creating new projects using the UI, it is convenient to immediately create a README so that the Git repository can is initialized, has a default branch and can be cloned. Until the first file is created it can't be cloned.
Additionally, in some orgs there are only a few people with permissions to create projects, and most users have developer permissions. If a project is created for a developer, but the master branch doesn't exist, because the first branch pushed will become the default branch and this is protected by default in most instances, the developer will not be able to push a feature branch (since it will be consider the default and thus protected). Providing an easy way for users create a readme when creating a project will help prevent this problem.
Original Proposal
### Proposal
Add a new option to create the project with a README.md in the master branch.
The option should be unchecked by default.
If checked by the user, when the project is created:
create master branch
create first commit Initial commit which should add README.md with the content # <project name>\n
Design
The checkbox will be unchecked by default
If the user checks the feature
create master branch
create first commit Initial commit which should add README.md with the content # <project name>\n<project description>
Copy
Initialize repository with a READMEAllows you to immediately clone this project’s repository. Skip this if you plan to import an existing repository.
Future improvements
Show generators for .gitlab-ci.yml, LICENSE and .gitignore, ideally with support for template repositories
And why here instead of the current button in the project dashboard?
@JobV we have Add README link already on project dashboard. But it takes me to creating new file form. While my request is to generate REAME immediately. Take a look at GitHub to see how it works
@JobV yep. Do we want to schedule this or drop into Backlog?
Job van der VoortChanged title: Create project with README → When creating a project, show generators for README, .gitlab-ci.yml, LICENSE and .gitignore
Changed title: Create project with README → When creating a project, show generators for README, .gitlab-ci.yml, LICENSE and .gitignore
James Ramsay (ex-GitLab)changed title from When creating a project, show generators for README, .gitlab-ci.yml, LICENSE and .gitignore to Option to add README when creating a project
changed title from When creating a project, show generators for README, .gitlab-ci.yml, LICENSE and .gitignore to Option to add README when creating a project
We should also explain what is the benefit of adding a README file and that the file is initially empty.
We can fill the README file with the name and description of the project. We can default to .md file type, add the name of the project as an h1 # and the description as a paragraph below. I believe that the add README feature in GH behaves like this.
@jkarthik yes, that's correct. But users might not be Git-savvy and so they might not understand why we're offering to add a (basically “empty”) README file.
Just to share my two-cents' worth here: Referring to a comment I made previously, I feel like this is a dangerous idea that will cause more problems than it will solve..
We use Wrike for project planning, and because of how verbose a GitLab project configuration is, our workflow doesn't involve creating a project here until we have planned it out and built at least a proof-of-concept app.
It seems this is the way it's going to go anyway, so I'd like to ask that you please don't make this option "enabled" by default?? That would really suck..
Hi @jkarthik, small detail, the wording of the checkbox label now reads to me as I have to read it in combination with the headline, "Initialize project with a README file".
What do you think about "Add README file"?
Do we plan to have more checkboxes in this section in future?
@akaemmerle "Add README file" works. It's short and simple. I assumed that we'll add functionality to include a gitignore or pick a license in the future.
@jkarthik@akaemmerle I think we can further simplify this, to just a checkbox without header:
When we add more “quick start” functionality we can easily change the layout.
Additionally, it's important to make the distinction between the terms project and repository, and mix them carefully. In GitLab's case, a project has multiple features, one of them being the repository. In GitHub's case, they only refer to repository. Also, in this particular situation, the caveat of importing a repository is done after the project is created, so we should talk about it in future terms, not present — that's why I rephrased it to “plan to import” instead of “when importing”.
Thanks, @pedroms for pointing out the distinction between a project and a repository. I've updated the design in the description above. cc. @akaemmerle@sarrahvesselov
Is there an option to disable this Readme.md per default? In my case I already have a local repository and want to push it to a new project. And I usually forget to disable this checkbox when I create a project
Yeh changing the auto create README to be on by default is a terrible idea and really has ruined my day. Please, please, please give us an option to switch it off! Seems this functionality changed just recently.