git merge force code example
Example 1: git force pull
git fetch --all
git reset --hard origin/master
Example 2: git merge force
git checkout master
git merge -X theirs branchName
git push origin master --force # again, see below
Example 3: git force push
git push --force
Example 4: git merge tag to branch and squash commits
git checkout master
git merge --squash tag
git commit