renku icon indicating copy to clipboard operation
renku copied to clipboard

Proper handling of projects where the main branch is not called 'master'

Open ciyer opened this issue 4 years ago • 1 comments

Description

Renku should work correctly on repos where the main branch is not called 'master'.

ciyer avatar Jan 07 '21 10:01 ciyer

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

ciyer avatar Mar 04 '21 14:03 ciyer