Community
Participate
Working Groups
I'm not sure if this is a bug or a missing feature. To reproduce: Modify file A. Commit it to git. Modify file B. Open the Git Staging view and click the "Amend" button. Observed: I see file B as unstaged, the commit message from the commit that modified A, but file A does not show up as a staged commit. Expected: I see file B as unstaged, the commit messages from the commit that modified A, and file A shows up as a staged change. Also observe that this works correctly in "git gui", the GUI that bundles with command-line git. This is a problem because: - There is currently no way to use "amend" to remove existing files from a commit. - When amending the commit, there is no easy way to preview the entire change you are editing.
Missing feature.
bug 353816 and bug 459152 are related
I think our staging view does not do the right thing after the "amend" button was clicked. Currently the staging view does show always - Any difference between working tree and index in the top area "Unstaged changes" - Any difference between index and HEAD in the bottom area "Staged changes" In your steps before you do the last step (clicking the Amend button) there should be only listed b in the "Unstaged changes". If you do "add to index" on B "Unstaged changes" would be empty and "Staged changes" would contain be. But: if you hit the "amend" button then this is more a hint for commit creation which will very likely follow. The created commit should have HEAD~ as parent and not HEAD. But in the moment you hit the amend button we don't change HEAD and index (which would be wrong I guess). And therefore also content of "Unstaged changes" and "Staged changes" doesn't change. I think we should compare index versus HEAD~ to fill "Staged changes" after the amend button was pressed. The area "Unstaged changes" should not be affected by this button.
+1 that feature would be super useful.
see also https://dev.eclipse.org/mhonarc/lists/egit-dev/msg04066.html
New Gerrit change created: https://git.eclipse.org/r/77213
I vote for this feature especially when doing the modification of commit during interactive rebase, e.g. in situation when group of files should be removed from the commit A3 and added to commit A2. Or (if other commits are just replayed / continued up to HEAD) left as unstaged changes on HEAD. A1(HEAD)->A2->A3->...
I fully agree with the last comment. Being able to modify which files are added in a commit that is being edited during interactive rebase, and being able to edit the actual files at that point, both in the working directory and the index would be extremely useful. I am a former SmartGIT user and this is one of the features I miss the most. I vote for this feature.