|
|
Re: How do you add a change to the index? [message #689937 is a reply to message #689692] |
Tue, 28 June 2011 15:59 |
R Shapiro Messages: 386 Registered: June 2011 |
Senior Member |
|
|
Add to the index with the "Add" operation. You can get to that operation from the right-click menu under "Team". Or, better, customize your development perspective (Java, C++, whatever) to include the toolbar items from the "Git" command group. The '+" toolbar item is "Add". You'll also get toolbar items for Push, Fetch, Pull, Commit, Checkout, Rebase and Reset
You can also do adds as part of the "Commit" operation.
Finally, you can use the very handy "Git Staging" view to drag changes from the "Unstaged" box to the "Staged" box (or vice-versa).
|
|
|
Re: How do you add a change to the index? [message #691206 is a reply to message #689937] |
Thu, 30 June 2011 23:55 |
James Moore Messages: 3 Registered: March 2011 |
Junior Member |
|
|
R Shapiro wrote on Tue, 28 June 2011 11:59Add to the index with the "Add" operation. You can get to that operation from the right-click menu under "Team".
But doesn't that do the special case of "commit every change in a file"? How do I convince it to let me choose which change to commit?
R Shapiro wrote on Tue, 28 June 2011 11:59
You can also do adds as part of the "Commit" operation.
Perfect - but how? That UI is completely baffling. It gives me lists of files, not changes. How do I pick which changes I want, without grabbing every change in a file? I feel like I'm just not seeing something really basic. Double-clicking on a file just brings up a Java diff window, with no way to commit individual changes that I can see.
R Shapiro wrote on Tue, 28 June 2011 11:59
Finally, you can use the very handy "Git Staging" view to drag changes from the "Unstaged" box to the "Staged" box (or vice-versa).
How? I see how to drag entire files, but no way to drag changes.
In the vanilla git gui, there's a three-pane interface: one pane has the unstaged files with changes, another pane has the staged files with changes, and the third pane shows the changes in the selected file. That third pane is the core of the gui that I use all the time, choosing which changes to put into the index. What I'm looking for is the equivalent of that for egit, and for me at least, it's really hard to find.
[Updated on: Fri, 01 July 2011 00:31] Report message to a moderator
|
|
|
|
Re: How do you add a change to the index? [message #693454 is a reply to message #691383] |
Wed, 06 July 2011 14:02 |
R Shapiro Messages: 386 Registered: June 2011 |
Senior Member |
|
|
The more I think about this, the more I'm convinced that egit really needs to support adding individual changes to the index.
After all, why are we using Git rather than, say, Mercurial? The latter has a much cleaner and simpler design than the high convoluted design of Git. Trendiness aside, there are a couple of good reasons we pay the price of Git's excessive complexity.
The first advantage is that native Git is very fast. That this is the most important win is clear from the standard subtitle "Fast Version Control System" appearing on books and in web sites. Unfortunately we're already giving up some of this in the egit world by its use of jgit. I haven't measured but my subjective sense is that egit is no faster than MercurialEclipse, whereas command-line Git is certainly faster than command-line HG.
In the Eclipse context that leaves one reason for using git, and therefore egit: very fine-tuned control. And what's the perfect example of this? Per-change indexing. You might even say that the fineness of control is what justifies the index: if commits are always on whole files, you don't need an index to organize them, you just need checkboxes to indicate which files you want to include in any given commit.
Conclusion: support for per-change index control in egit is crucial.
The gui aspect of this could be handled in several ways. For instance it could be added to the right-click menu of the quick-diff markers, since those are already per-change. Combine that with automatic display of the selected file in Git Staging view and you have a simple solution that doesn't require any new widgits.
Comments ?
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04082 seconds