how to reset develop branch to master

trrrrrrm picture trrrrrrm · Aug 26, 2013 · Viewed 90.5k times · Source

I have develop & master branches, my develop branch is messy now and i would like to reset it and make it as a copy of my master. i'm not sure if merging the master into develop will make both of them identical. after trying to merge i got many conflicts i solved them using:

git checkout develop
git merge origin/master
//got many conflicts
git checkout . --theirs

is this enough for develop branch to be an identical copy to master ?

Thanks

Answer

Tim Jarvis picture Tim Jarvis · Aug 26, 2013

if you just want them to be the same thing

then

//from Develop and assuming your master is up to date with origin/master
git reset --hard master