How to select repository for staging view in Eclipse Luna 4.4?
Asked Answered
G

5

7

I'm not able to find a solution to a documented bug in Eclipse (Luna 4.4). I've cloned a git repository from Github into my eclipse workspace view and imported the associated Maven project into my project space. When I then display the staging view in Eclipse, it appears, but says "No Repository Selected" up top. I'm therefore unable to drag any changed files into the staging area and commit them. How do I associate my cloned repository with the staging view?

Goren answered 23/6, 2015 at 1:15 Comment(0)
W
13

Try enabling linking between the Git Staging view and other views. You do so by pushing the "Link with Editor and Selection" button on the top right of the view, to the right of the "Refresh" button.

In the top image, the view is not linked.

Unlinked Git Staging View

In the bottom image, the view is linked and the button appears "pushed"

linked Git Staging View

Woodrow answered 16/12, 2015 at 11:36 Comment(1)
Please @swingMan, accept this as the accepted answer if it worked. Personally, it was enough in my case.Preceptory
H
4

"Enabling linking between the Git Staging view and other views" didn't help in my case. I also tried deleting branch and checking out again. Nothing worked.

What I did was:

Right click on any of the modified file -> Team -> Commit.

Somehow it worked and I could see all modified files in unstaged changes.

Harmonicon answered 1/6, 2017 at 12:11 Comment(0)
L
3

I had the same issue. This is what worked for me - Under the 'Package Explorer' Right click on the your project -> Team -->Share Projects... -> Then in the list of projects, select your project * Seems weird, but sharing back to itself resolved this issue for me Good Lucks

Latchstring answered 10/4, 2020 at 18:50 Comment(0)
D
1
  1. click on git icon,
  2. select the repositorie you want to use
  3. right clik to show the menu
  4. then select "show in"
  5. then select "git staging"
Dilatometer answered 9/11, 2017 at 16:10 Comment(0)
R
0

Maybe you are missing one step. If you have a local repository already: 1. On "Quick Access" of your Eclipse search Git repository 2. Select Team option (Right click on project -> Team) and select Share Project, mark Use or create...and select .git directory of your project cloned. 3. Select Team option and now select Add Index 4. Select Team option and now select Commit, you will see Git View now has your project with the correct branch.

Richmal answered 3/2, 2020 at 14:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.