1

I have checked the boxes "Git Repository Objects" and "Git Resources" in Preferences>General>Appearance>Label Decorations. Also in Preferences>Version Control (Team)>Git>Label Decorations>Text Decorations I have "{dirty:>} {name} [{repository }{branch}{ branch_status}]" under Projects.

Is there any other setting I need to set? This is in the original workspace where the project was created, in another Eclipse instance with a different workspace the branch is displayed as it should.

torek
  • 448,244
  • 59
  • 642
  • 775
AutoAlex
  • 33
  • 1
  • 5
  • Is the repository clone that the project is located within also known by the Git Repositories View? – nitind Jun 03 '22 at 16:02
  • Maybe your project is copy and not the Git working tree. Please tell your project location (_Project > Properties: Resource_) and the location of your Git repository. – howlger Jun 04 '22 at 11:10
  • Sorry, Im new to git, so I dont understand these questions, to describe what I did: Eclipse project A was added to github as a repository, then changes were made to that project within the same Eclipse workspace and a new branch added. In another Eclipse instance B the repository has been added as a project and is showing the branch it is currently on. But in Eclipse A it is not. – AutoAlex Jun 04 '22 at 17:07

1 Answers1

0

I'm using STS 4(backed by Eclipse). I deleted ProjectManager(project) from STS 4 (but not from disk),

When I had a warning of "contains resources that are not in sync with", I refreshed the project with F5 in the (package)Explorer.

Then I imported the project again and I'm seeing the branch name as shown below.

Shown branch name after project delete and import

Park JongBum
  • 1,245
  • 1
  • 16
  • 27