Git commit not possible. There are no staged files
Asked Answered
V

2

24

I am using EGits with Eclipse and running into some issues.

I have one change from head; I have made one new class.

When I right click on this class and click "push", the following dialog shows and I cannot get past it :

Dialog box with "Committing is not posssible. There are no staged files".

Anyway, I need to push this file because I can't commit in real life, and now I cannot commit in Eclipse either and it's taking it's toll mentally.

Thanks.

PS I have googled this extensively looking for an easy fix (like a "stage" button) and found nothing.

Villa answered 27/7, 2016 at 11:1 Comment(4)
You need to find the Git staging view and then add the modified file and new file to the index. It appears that eGit is not doing this for you automatically. Or, as a backup, you can just git add these files from the Git Bash.Illiteracy
Right click on that file and select Add to IndexKoh
"I can't commit in real life" You definitely need more commitment then.Driver
"Git staging view and then add the modified file and new file to the index" - this helped meSin
S
20

using EGit: Right click it and navigate to Team => Add.

after then Push the code

Before pushing the file add that new file on git using terminal

git add after then

git push origin branch

Scurry answered 27/7, 2016 at 11:11 Comment(0)
F
0

OR you need to add to Index first before committing it.

Fogle answered 22/9, 2020 at 6:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.