tags:

views:

34

answers:

1

I did git pull origin newbranch:newbranch ... but for some reason.. this tried merging newbranch in my origin with master in local.. and it resulted in conflict .. 1)how do i undo the half done merge? 2)how do i pull newbranch in origin to a new branch in local repo named "newbranch"

+1  A: 

Use this to reset back to your pre-merge state:

git reset --merge

(Or if you're using a version of git before --merge was available, use --hard.)

Then create and checkout your branch, and pull, merging into it:

git checkout -b newbranch
git pull origin newbranch

Of course, you'll get the exact same conflicts as before, because you're merging into the same commit...

Jefromi