Community
Participate
Working Groups
The current EGit commit dialog can only commit changes in a Git repository if the changed files are inside the workspace. There are at least two scenarios where changes outside the workspace occur: (1) Delete a shared project in Eclipse (including contents). Afterwards you are not able to commit the changes. (2) The Git repository root folder contains a number of shared projects. In this case the files located directly below the repository root folder are outside the Eclipse workspace. Example: EGit Git repository d020964@WDFD00217740A /c/git/egit (master) $ ls -a -l total 41 . .. .eclipse_iplog .git .gitattributes EGIT_INSTALL LICENSE README SUBMITTING_PATCHES org.eclipse.egit org.eclipse.egit-feature org.eclipse.egit-updatesite org.eclipse.egit.core org.eclipse.egit.core.test org.eclipse.egit.doc org.eclipse.egit.source-feature org.eclipse.egit.ui org.eclipse.egit.ui.test pom.xml tools If you e.g. change LICENCE you are not able to commit this change with EGit afterwards. As a workaround you can create a general project "EGit" with location /c/git/egit. But in this case you have to deal with nested projects. I tried this and got some issues: 1. The folders of the nested projects are shown in the General project. Folders which are derived in the nested projects are NOT derived in the top level project and get decorated. A lot of decoration overhead occurs because decoratinng the project resource is already very expensive (decorator goes through the complete project tree). 2. Nesting causes the problem that 2 Eclipse resources exist for the same repository file. Summarized I think working with a nested project is no good solution. To avoid using nested projects and to solve the issue in (1) we could enhance EGit in a way that it can deal with changes outside the workspace. The following would be required to achieve this: PROPOSALS ========= 1. Extend the commit dialog to show / commit ALL changes in the Git repository. 2. Introduce the relevant Git actions (add, rm, ...) in the Git Repositories View in the working directory tree. This would allow to perform Git operations on files which are not in the workspace. Comments?
(In reply to comment #0) > PROPOSALS > ========= > > 1. Extend the commit dialog to show / commit ALL changes in the Git repository. > > 2. Introduce the relevant Git actions (add, rm, ...) in the Git Repositories > View in the working directory tree. > This would allow to perform Git operations on files which are not in the > workspace. +1 I remember myself looking for (2) some time ago. It just makes sense to perform some (most?) repo operations from the repositories view. I even wonder if there are operations that don't make sense for single projects but in the repositories view?
+1 for both proposals
Can I point out that as it stands EGit simply has nothing analogous to performing "git status" on the command line which takes a repository wide view (regardless of what is in Eclipse Projects) and is of course fundamental to working with git. I also like the idea of adding something to do this to Repository View.
(In reply to comment #3) > Can I point out that as it stands EGit simply has nothing analogous to > performing "git status" on the command line which takes a repository wide view > (regardless of what is in Eclipse Projects) and is of course fundamental to > working with git. Then you maybe want to review http://egit.eclipse.org/r/#change,3106 Though this still doesn't support non-workspace resources but I asked Bernard if he could add this.
http://egit.eclipse.org/r/#change,3369 implements committing non workspace changes.
Wondering why this is still New. It seems like this is already implemented.
Fixed with commit 2f724143881b110bff53983df9ccf1d88366acc1.