eclipsegitcommitegiteclipse-mars

Git commit not possible. There are no staged files


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.


Solution

  • 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