Skip to content

Make "Initialize repository with a README" unchecked by default

Insight

90% of the time i add an repoistory in GitLab i already have a local git repo created via git init and just want to push my experiment / my new Project to GitLab as it left the state where it´s just a few lines of hacked code on my development machine.

If you forgot to uncheck "Initialize repository with a README", you try to push your local repo to GitLab and are rewarded with "local and remote branch history differs" message of cause.. Then you naturally try to Force push, as you try to override the history that´s already created in GitLab, but that won´t work as the default branch is protected by default of cause 💃 So you either click through the webinterface to unprotect the branch temporarily or just delete the repo and create it again without README

Action

It would be cool to collect some kind of metric whether creating a repo via GitLab first or creating one locally first is more common.. Maybe have a script that searches all repos in GitLab.com which where created after the "Initialize repository with a README" was introduced and check whether the commit by GitLab to create the README.md is still part of the history of the default branch.. If < 50%: Just change the default to "unchecked"..

This ticket is related to: #377958

Edited by Timo Witte