Bug 582225 - Creating a repository in the "Team->Share..." dialog ignores init.defaultBranch
Summary: Creating a repository in the "Team->Share..." dialog ignores init.defaultBranch
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: 6.6   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 6.7   Edit
Assignee: Thomas Wolf CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-22 05:54 EDT by Thomas Wolf CLA
Modified: 2023-08-01 18:24 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wolf CLA 2023-07-22 05:54:46 EDT
Steps to reproduce:

* Set init.defaultBranch = main in the git user config
* Create a new Eclipse project (General Project is fine)
* Choose Team->Share... from the context menu on the new project
* Click "Use or create a repository in parent folder of project" in the dialog
* Select the project
* Click "Create Repository"
* Finish the dialog.
* Open the repository in the staging view: it'll indicate unborn branch "master".
Comment 1 Sam Hobbs CLA 2023-07-22 09:58:31 EDT
As a work-around, after creating the repository, can we change master to main (or whatever name we need for the branch) in the HEAD file?
Comment 2 Thomas Wolf CLA 2023-07-22 13:26:37 EDT
(In reply to Sam Hobbs from comment #1)
> As a work-around, after creating the repository, can we change master to
> main (or whatever name we need for the branch) in the HEAD file?

Yes, if you do it before making any commit. Otherwise just rename the "master" branch to "main".
Comment 3 Matthias Sohn CLA 2023-08-01 18:24:55 EDT
https://git.eclipse.org/r/c/egit/egit/+/203309/1 was merged as 003c181b601b3f387aef819cae8d9f6f6bc14ce1