Hard reset isn't erasing local commits [message #1779100] |
Tue, 02 January 2018 14:53  |
Eclipse User |
|
|
|
Using Eclipse 4.7.2 and egit 4.10.0.201712302008-r.
I'm on the master branch on a repo, which I've been working on for a long time, although I haven't committed or pushed anything for a week or two. Today I made some changes to a file, verified it was what I wanted, and then committed and pushed.
Surprisingly, it was rejected, saying something about "not fast forward merge".
Looking at the repo list, I see "^2" (uparrow, not caret), which is surprising, as I only attempted to commit and push one file).
So, I decided to start over, saving the changes I needed to make in an external file, and then selecting "Reset..." and then "Hard'. I've used this technique many times. Today, it seemed to do nothing. It did say it was resetting, and showing progress, but when it was done, my changed file was still in the state I had changed it to, and the repo list still shows "^2".
I'm confused.
|
|
|
|
|
Re: Hard reset isn't erasing local commits [message #1779111 is a reply to message #1779110] |
Tue, 02 January 2018 16:49  |
Eclipse User |
|
|
|
regarding the reset behavior you observed: is the file which wasn't reset maybe untracked (not yet versioned by git) ?
Untracked files have a ? decorator. See "preferences > Team > Git > Label Decorations" to see the decorators used in EGit
for the different possible git statuses of a file.
|
|
|
Powered by
FUDForum. Page generated in 0.04548 seconds