bad git pull

You pull. You have conflicts. You want to go back to how it was before
pulling and push your version. How do you do that without editing the
file line by line?

Milan Dobrota wrote:

You pull. You have conflicts. You want to go back to how it was before
pulling and push your version. How do you do that without editing the
file line by line?

Use git mergetool?

Anyway, this question is probably better asked in a Git forum.

Best,

Milan Dobrota wrote:

You pull. You have conflicts. You want to go back to how it was before
pulling and push your version. How do you do that without editing the
file line by line?

If conflicts occur during a pull the auto-merge should fail leaving the
changes in your working tree. At this point you should be able to run:

git reset --hard

to return your working tree to the tip of the current branch.

P.S. I agree this question would be more appropriate for a git forum.

Marnen Laibow-Koser wrote:

Milan Dobrota wrote:

You pull. You have conflicts. You want to go back to how it was before
pulling and push your version. How do you do that without editing the
file line by line?

Use git mergetool?

Milan, If you are interested in seeing a short demonstration of conflict
resolution in git you can watch my screencast on the subject here:
http://vimeo.com/5728959

Just checkout your version from your local repository again. If the
pull failed due to conflicts then so will a push, in fact I believe it
is always best to pull, sort the conflicts, commit then push.

Colin

Thank you guys. git merge tool is awesome!!! :slight_smile: