Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 366481

Summary: Edge Case: Bad Error Message when tying to create a branch on an brand new empty git repository
Product: [Technology] EGit Reporter: Adib Saikali <adib>
Component: CoreAssignee: Project Inbox <egit.core-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Adib Saikali CLA 2011-12-13 00:01:26 EST
Build Identifier: 201111221000

After creating a brand new local repository with git init I wanted to create a feature branch but since I had not checked in anything, the Create Branch Dialog box key telling me that I have not selected a source reference and therefore it could not create the branch. The problem is that the drop down box with the sources is empty since there is no commit. I fully understand that it does not make sense to branch in git unless you have something already committed otherwise there is no parent for the branch to point to, but it took me about an hour of googling to understand the problem. It would be greate if eGit told me that I could not create a branch on an empty repository that would be helpful for a new git user like me.

Reproducible: Always

Steps to Reproduce:
1. Create a brand new git repository
2. Right click on the newly created repository in "Git Repositories" View
3. From the context menu Switch To > New Branch 
4. Fill in all the details 

Notice that the dialog box complains that "Please select a source branch" but the source ref drop down is empty. 

Fix should be for the dialog box to tell me that since I have not made any comits into into the repo I can not yet branch. Maybe it can suggest a fix by comitting an empty .gitignore file.