I have a problem with my project in Eclipse IDE. For the first time, I worked on an old version and made several changes.
I tried to upload the project on GitLab for the first time I configured Git on Eclipse IDE and I tried to commit and push "but I could do that only after doing a 'Fetch' from the remote branch and commit the 'Merge' change in my local repository.
Because I got this error:
rejected non-fast-forward
I followed this link Egit rejected non-fast-forward to fix it.
The fetch downloaded all the git project files in my project on Eclipse. Until now in my project, I have a subfolder like this: myProject/myProject
.
I made several commits and push and it works normally. I figured out that a subdirectory in gitLab docroot
is created with every push I make.
This is the local project structure:
This is the project structure on GitLab:
I want to delete docroot/WEB-INF/classes
from GitLab.
How to delete this commit from GitLab using git plugin in Eclipse and how to correct my local project structure?
docroot/WEB-INF/classes
is a folder. Git does not track folders, only files:
For details see the EGit User Guide and be aware that old Stack Overflow answers refer to outdated version of EGit.