I have currently one of the project it contain more branches. master branch not yet merger long time. So i want switched to master with latest code.
Can you please g
Firstly, I would try just merging it to master and seeing if there really are lots of conflicts - git's merging is great at only marking genuine conflicts. If you make sure that your git status is clean before you start, and you find that there are too many conflicts to deal with, you can just go back with:
git reset --merge
However, if you just want to make your current master the same as your other branch, you could do that with:
git checkout master
git reset --hard other-branch
However, that's generally a bad idea since:
git branch old-master master beforehand.)master branch, so if you've ever shared this branch with anyone the results will be confusing for both of you.git reset --hard should always be used with caution, since it will throw away all uncommitted changes you have.