Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 368086

Summary: "Push..." doesn't update remote refs in local repository
Product: [Technology] EGit Reporter: Florent Paillard <fpaillard>
Component: UIAssignee: Project Inbox <egit.ui-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: karenfbutzke, webcane
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
compare dialog shows right remote commit number in opposite of Git Repositories view none

Description Florent Paillard CLA 2012-01-07 11:15:27 EST
When pushing a remote tracking branch with "Push to upstream..." in Eclipse, EGit will update the local ref of the remote branch (say origin/master) to the same commit referenced by local "master" branch.

When pushing the same branch with "Push...", EGit will NOT do this update (even if the commit have been pushed and the master branch in the remote repository updated).
An additional, manual fetch is necessary to update local "remote/master" ref.
Comment 1 Stefan Lay CLA 2012-01-09 05:09:03 EST
Yes, that's missing.

The (technical) reason is that the PushWizard does not use the origin name but the URI to call JGit's push command. JGit's push command works correctly, it only updates the remote tracking branch if a remote name is given, but not when a URI is given.
Comment 2 Florent Paillard CLA 2012-01-09 05:25:55 EST
Thanks Stefan for your answer.

I well understand the point, particularly when the PushWizard is used with a "Custom URI".
That would be nice if the PushWizard could update the remote tracking branch when used with a "Configured remote repository".

Best Regards,
Comment 3 Mikhail Niedre CLA 2015-01-13 15:44:36 EST
Created attachment 249912 [details]
compare dialog shows right remote commit number in opposite of  Git Repositories view

add screenshot