Git Hard Merge

by Devansh

Posted on 06 Oct 2018 11:10:51 (2 months ago)

As we already know now a days, version controlling are very important and we all do version controlling. So let say the case where we are working in a different branch and suddenly your master branch got conflict or corrupted. If there are no options to get the master branch merge than in last case we can do hard merging and make the best branch to master. Below are the commands for hard merging.

git checkout master
git reset --hard better_branch
git push -f origin master