Bug 302078 - Add repository actions to file and folder context menu (Push, Pull, etc)
Summary: Add repository actions to file and folder context menu (Push, Pull, etc)
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement with 2 votes (vote)
Target Milestone: 3.5   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2010-02-07 19:32 EST by Jon Schewe CLA
Modified: 2014-09-14 22:08 EDT (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Schewe CLA 2010-02-07 19:32:43 EST
Build Identifier: 

The commit menu item is available on all file sand directories, however fetch, pull, push, etc. are only available at the top level. It would be nice if these menu items were available everywhere.

Reproducible: Always
Comment 1 Mathias Kinzler CLA 2011-03-30 06:49:11 EDT
Since 0.11, we can configure the Git Action Set with a "Push changes to Upstream" button. This button is available on any Git-controlled resource.

I think that this is much more usable than right-clicking Team->Push etc., so I wonder if we still need this feature.
Comment 2 Lars Vogel CLA 2011-09-16 15:32:20 EDT
+1 for Team -> Push always available. We are used to do team related work there.
Comment 3 Andre Dietisheim CLA 2011-09-16 16:31:53 EDT
(In reply to comment #2)
> +1 for Team -> Push always available. We are used to do team related work
> there.

So there was no special reason to enable push when projects are selected only? 

It would greatly meet my needs to have push enabled even on files and folders in bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=330048
Comment 4 Mathias Kinzler CLA 2011-09-19 03:05:00 EDT
(In reply to comment #3)
> (In reply to comment #2)
> > +1 for Team -> Push always available. We are used to do team related work
> > there.
> So there was no special reason to enable push when projects are selected only? 
> It would greatly meet my needs to have push enabled even on files and folders
> in bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=330048

Well, technically there is no reason to enable push on files, but it might badly interact with the mindset of people coming from other team providers in that they might think they can push a file or folder individually somewhere. Having the action on projects only isn't really the solution, but at least it reminds you that you can't push a single file... From that point of view, one could argue that push should only be available on the Repositories View (as it has nothing or at least only little to do with the resources shown in the project explorer), but then of course we need to appear somewhere in the Team menu...
Having said that, I see no technical problem, but rather a user interaction problem. Another consideration should be that the Team menu is already very big and complex, and we should be careful not to overload it further.
Comment 5 Max Rydahl Andersen CLA 2011-09-20 09:34:42 EDT
(In reply to comment #4)
> (In reply to comment #3)
> > (In reply to comment #2)
> > > +1 for Team -> Push always available. We are used to do team related work
> > > there.
> > So there was no special reason to enable push when projects are selected only? 
> > It would greatly meet my needs to have push enabled even on files and folders
> > in bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=330048
> 
> Well, technically there is no reason to enable push on files, but it might
> badly interact with the mindset of people coming from other team providers in
> that they might think they can push a file or folder individually somewhere.

Since I can do git push anywhere on the command line this really shouldn't be a problem IMO.

Just make the dialog show explicitly that it is pushing git repo for XYZ project to whatever remote destination(s).
Comment 6 Miles Parker CLA 2011-09-20 21:34:05 EDT
(In reply to comment #4)

> Having the action on projects only isn't really the solution, but at least it
> reminds you that you can't push a single file... From that point of view, one
> could argue that push should only be available on the Repositories View (as it
> has nothing or at least only little to do with the resources shown in the
> project explorer), but then of course we need to appear somewhere in the Team
> menu...
> Having said that, I see no technical problem, but rather a user interaction
> problem. Another consideration should be that the Team menu is already very big
> and complex, and we should be careful not to overload it further.

I think Mathias makes important points. The Eclipse interface is so polluted with menu items and we have a real tendency to put things on the context-menu that aren't really object specific at all. I'm dealing with that issue on another project right now. In this case it's arguably not as huge a deal as they are in the Team menu but this has always been confusing for me for precisely the reason that push didn't seem to have anything to do with a specific project. Because it doesn't. :) On the other-hand, where do you put the damn thing?

This is not such an incidental issue when as a git newbie, you click "Reset.." on your project, choose Hard, sort of don't pay attention to the dialog that comes up next, and find your entire repos replaced. Ask me how I know..
Comment 7 Max Rydahl Andersen CLA 2011-09-21 06:26:36 EDT
Then lets talk about what should be removed from the menu so Commit/Push/Pull becomes available - the three most used commands is it not ?
Comment 8 Mathias Kinzler CLA 2011-09-21 09:54:29 EDT
(In reply to comment #7)
> Then lets talk about what should be removed from the menu so Commit/Push/Pull
> becomes available - the three most used commands is it not ?

As said above, the most used commands (up to eight) can be configured to appear in the main toolbar and/or main menu by configuring your perspective to show the Git Command Group. This is what I use almost exclusively and I find it much easier to work with than the Team context menu. Admittedly, this feature is a bit obscure, but we as Git just can't assume that we should always appear there and have to leave the task of doing this configuration to the end user.
Comment 9 Miles Parker CLA 2011-09-21 14:16:23 EDT
(In reply to comment #8)
> (In reply to comment #7)
> > Then lets talk about what should be removed from the menu so Commit/Push/Pull
> > becomes available - the three most used commands is it not ?
> 
> As said above, the most used commands (up to eight) can be configured to appear
> in the main toolbar and/or main menu by configuring your perspective to show
> the Git Command Group. This is what I use almost exclusively and I find it much
> easier to work with than the Team context menu. Admittedly, this feature is a
> bit obscure, but we as Git just can't assume that we should always appear there
> and have to leave the task of doing this configuration to the end user.

Are you sure? I think this is a common enough usage that it might be nice to have it included at least for the most common perspectives such as java. I don't think anyone is going to install git without the idea that they would want access to these, and I certainly wasn't aware of them. Also when Git makes it into Juno SDK build :) this would be the default Eclipse workspace setup.
Comment 10 Mathias Kinzler CLA 2011-09-22 04:28:41 EDT
(In reply to comment #9)
> Are you sure? I think this is a common enough usage that it might be nice to
> have it included at least for the most common perspectives such as java. I
> don't think anyone is going to install git without the idea that they would
> want access to these, and I certainly wasn't aware of them. Also when Git makes
> it into Juno SDK build :) this would be the default Eclipse workspace setup.

It's a matter of being a good citizen in an extensible SDK. Git is just one version control system among others and forcing it into the main menu implies that it is somehow more "right" than another one (imagine all VCS adding stuff to the main menu)... In other words: we can't assume that we are going to be used just because we are installed.
Comment 11 Andre Dietisheim CLA 2011-09-22 04:40:47 EDT
IMHO we're getting of track if we start talking about the main menu and the toolbar. 
To me verybody is used to look for the team options in the context menu and that's exactly where "push to" is missing if you select a file/folder. To me putting it into the main-menu or the toolbar is not an equivalent alternative. Furhtermore having a default set 'right' is something very important to get adopters served in an intuitive manner. 
It's even more true since commit/push/pull are the most frequent commands. "Push to" is to me even more important than "Advanced" which is already available in the context menu for files/folders.
Comment 12 Robin Stocker CLA 2013-09-27 10:08:31 EDT
Bug 330048 has been fixed, we now have "Commit and Push" in both the commit dialog and the staging view.

Currently, repository-wide actions are only available from the project context menu, while the context menu of files and folders is nice and small as it only contains file-level actions. Also see comment 4, +1 to that.

Maybe adding a "Repository" submenu to the file/folder menu would be an option? This way, there would only be 1 additional menu entry and maybe it would also make it clearer to the user that the actions within that submenu are executed on the repository, not the selected file.
Comment 13 Jon Schewe CLA 2013-11-27 09:53:21 EST
Adding the "Remote" or a "Repository" menu option seems reasonable. 

I've started using EGit more lately and I haven't been missing this feature as much as I used to. I've found that keeping the "Git Staging" and "Git Repositories" views open all of the time really helps. 

I agree with the thought from comment#4 that some users would get confused about what exactly is being pushed.
Comment 14 Robin Stocker CLA 2013-11-27 16:44:53 EST
(In reply to Jon Schewe from comment #13)
> I've started using EGit more lately and I haven't been missing this feature
> as much as I used to. I've found that keeping the "Git Staging" and "Git
> Repositories" views open all of the time really helps. 

(Off topic:) Yes, any idea how we could make the "Git Staging" view more visible? It's so comfortable to use, but I think that currently many people don't even know about it.

Maybe we could propose to open it the first time a user does Team > Commit... ?

> I agree with the thought from comment#4 that some users would get confused
> about what exactly is being pushed.

Do you think that's the case even when the menu would be called Team > Repository > Push to Upstream?
Comment 15 Jon Schewe CLA 2013-11-27 23:30:27 EST
(In reply to Robin Stocker from comment #14)
> (In reply to Jon Schewe from comment #13)
> > I've started using EGit more lately and I haven't been missing this feature
> > as much as I used to. I've found that keeping the "Git Staging" and "Git
> > Repositories" views open all of the time really helps. 
> 
> (Off topic:) Yes, any idea how we could make the "Git Staging" view more
> visible? It's so comfortable to use, but I think that currently many people
> don't even know about it.
> 
> Maybe we could propose to open it the first time a user does Team >
> Commit... ?

I don't know, but that might work. It is quite handy.

> 
> > I agree with the thought from comment#4 that some users would get confused
> > about what exactly is being pushed.
> 
> Do you think that's the case even when the menu would be called Team >
> Repository > Push to Upstream?

That would probably be OK.
Comment 16 Matthias Sohn CLA 2013-11-28 05:19:54 EST
(In reply to Robin Stocker from comment #14)
> (In reply to Jon Schewe from comment #13)
> > I've started using EGit more lately and I haven't been missing this feature
> > as much as I used to. I've found that keeping the "Git Staging" and "Git
> > Repositories" views open all of the time really helps. 
> 
> (Off topic:) Yes, any idea how we could make the "Git Staging" view more
> visible? It's so comfortable to use, but I think that currently many people
> don't even know about it.
> 
> Maybe we could propose to open it the first time a user does Team >
> Commit... ?

or simply open the staging view when the user clicks "Team > Commit..." and delete the commit dialog ;-?
Comment 17 Robin Stocker CLA 2013-11-28 08:16:12 EST
(In reply to Matthias Sohn from comment #16)
> or simply open the staging view when the user clicks "Team > Commit..." and
> delete the commit dialog ;-?

+1 from me, but probably -1 from others ;).
Comment 18 Robin Stocker CLA 2014-09-08 07:25:27 EDT
Proposed change to implement this: https://git.eclipse.org/r/33028
Comment 19 Matthias Sohn CLA 2014-09-14 17:53:12 EDT
(In reply to Robin Stocker from comment #18)
> Proposed change to implement this: https://git.eclipse.org/r/33028

merged as 265e5a1cf7530a3a8a46a7d0958d03b02b565bd6