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

Bug 371811

Summary: Missing Git reset?
Product: [ECD] Orion Reporter: John Arthorne <john.arthorne>
Component: GitAssignee: Project Inbox <orion.git-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: maciej.bendkowski
Version: 0.4   
Target Milestone: 8.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description John Arthorne CLA 2012-02-16 14:53:16 EST
I20120215

1) Cherry-picked a change from a branch into master to review it
2) Original committer merged their change into master

-> Now I have an unpushed commit in my local master that I can't get rid of. I really want git reset HEAD~1 here. Bug 347951 discusses adding API in Orion to do this, but I don't see any UI for it. Did I miss something, or is there no UI in Orion to reset my branch pointer to a previous commit?
Comment 1 Susan McCourt CLA 2012-02-16 16:15:06 EST
I pinged Mark today with this very same problem!  I had inadvertently clicked "Merge" on a topic branch when I meant to "checkout" which merged my topic commits into master.

You can't reset from the local branch, you have to click "view all branches" and then choose reset from the remote branch.

I think we should look at this in 0.5 - a "reset selected local to remote" command in addition to "reset active to selected remote"
Comment 2 John Arthorne CLA 2012-02-16 16:22:14 EST
(In reply to comment #1)
> I pinged Mark today with this very same problem!  I had inadvertently clicked
> "Merge" on a topic branch when I meant to "checkout" which merged my topic
> commits into master.
> 
> You can't reset from the local branch, you have to click "view all branches"
> and then choose reset from the remote branch.
> 
> I think we should look at this in 0.5 - a "reset selected local to remote"
> command in addition to "reset active to selected remote"

Also very natural in git would be "reset HEAD to this commit" command in the log branch log view. I might have other unpushed commits that I don't want to trash - and something like that would make it very clear what commits are being discarded.
Comment 3 John Arthorne CLA 2015-05-06 14:33:32 EDT
This is now supported. Select a commit in the Git timeline, and there is a "Reset" button (two arrows in a circle).