Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 343963 - [server] Need "git reset --hard HEAD" API on server
Summary: [server] Need "git reset --hard HEAD" API on server
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.2   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.2   Edit
Assignee: Tomasz Zarna CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 338202 343961
  Show dependency tree
 
Reported: 2011-04-27 10:15 EDT by libing wang CLA
Modified: 2011-09-01 11:42 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description libing wang CLA 2011-04-27 10:15:16 EDT
I just got real world conflicts when fixing bug 343918 .
In my case I had to use "git reset --hard HEAD" to undo my commit and pull
again as the incoming changes happened to resolve my issue.
We need a support to let user undo the last commit and pull the change so that
the local changes on the client file is overwritten.  If they decide to do so ,
user does not need to manually resolve the conflict and push if they decide to
do so.
Comment 1 Susan McCourt CLA 2011-04-27 16:10:11 EDT
+1.
I had real world conflicts yesterday when committing a small change to navigate-table and colliding with a very large from Boris' file client refactoring.  

The diffs scared me and most were unknown to me.  I knew that my change was simply a variable rename, so I wanted to just take Boris' work and then make my change again rather than merge manually.
Comment 2 Tomasz Zarna CLA 2011-05-02 10:38:47 EDT
Sounds like a subtask of bug 338202 to me.
Comment 3 Tomasz Zarna CLA 2011-05-05 08:40:55 EDT
Fixed with http://git.eclipse.org/c/e4/org.eclipse.orion.server.git/commit/?id=39fcadc5998b912d5e97823235546c08cd35cd15 [1]. You should be now able to hard reset all changes in index and working tree. Resetting a single file is still not available, blocked by bug 338701 in JGit.

[1] Ignore the comment there, the fix is for this bug, not bug 338202.