renku
renku copied to clipboard
Proper handling of projects where the main branch is not called 'master'
Description
Renku should work correctly on repos where the main branch is not called 'master'.
Some notes
-
git clone
will checkout the branch marked as "default" in GitLab. - In the core service, it should be possible to just rely on the default behavior of git for ensuring we are on the default branch
- As with git, it should be possible to set the name of the initial branch when creating a project, using
--initial-branch
in the CLI, or as an argument to the core service - The UI should look up in GitLab the default branch name for the group when creating a new project and pass that to ensure consistency.
See Also
- https://github.com/github/renaming
- https://sfconservancy.org/news/2020/jun/23/gitbranchname/
- https://docs.gitlab.com/ee/user/group/#use-a-custom-name-for-the-initial-branch
- https://git-scm.com/docs/git-init#Documentation/git-init.txt---initial-branchltbranch-namegt
Testing
These projects can serve as test cases
- https://dev.renku.ch/projects/cramakri/main-as-main
- https://dev.renku.ch/projects/cramakri/main-as-main-with-master