0

I've worked on a few files but there have been conflicts, trying to reset to my previous state via "reset" in eclipse seems to have broken quite a bunch of things and won't show me the merge conflict for changing anymore. Now, I would like to go back to a previous commit (say, the last time I committed and pushed something 2 days ago) and be able to pull (fetch and merge) again so I can properly take care of the merge conflicts.

From what I've seen, git reset --hard seems to be suggested a lot but there is also someone saying I shouldn't do this when working with others (there are multiple people working on the project). I just need my local repository to go back to a certain commit, so I can pull and fix the conflicts, without causing any possible problems or hick ups for anyone else. It shouldn't even be noticed, basically.

For clarification: I don't just want to temporarily reset it, I want to 100% go back to that state and lose my changes (I've backed up the file), so I can just copy/paste it back in and then fix the merge conflict.

LML
  • 53
  • 6
  • that appears to be doing something completely different – LML Jun 02 '16 at 12:00
  • actually, @JulienLopez is correct. That is exactly what you want to be doing. Resetting your local repository to the head of your remote repository. This will reset your local repository to be identical to the remote (where everyone else is too). This will allow you to do your changes and merge conflicts locally before you push them up. – g19fanatic Jun 02 '16 at 14:25

0 Answers0