Git – What’s the difference between “Push…” and “Push to upstream…” in Eclipse

eclipseegitgit

When using "Push to upstream…" in Eclipse, the new "local" commits are pushed to remote repository and the remote branch ref is updated in the local repository (so master and origin/master reference the same commit).

When using "Push…" and adding a push ref on master in the wizard window (refs/heads/*), the new "local" commits are pushed to remote repository (like previously) but the remote branch ref is not updated in the local repository (so master reference the last commit but origin/master didn't moved).

What's the difference between these two ways of working? Is it useful for particular decentralized work flows?
What would be the corresponding git commands of these two approaches?

Best Solution

Push to Upstream.. pushes your branch as you would expect for a remote-tracking branch.

Push... opens a dialog and lets you specify which refspecs you should push up, including tags, special cases like HEAD:refs/heads/master, etc.

That it doesn't update origin/master seems like a bug to me, or maybe they're waiting for the next fetch to update origin. I'd open a bug at https://bugs.eclipse.org/bugs/enter_bug.cgi?product=EGit&component=UI

PW