How do I force a subtree push to overwrite remote changes?

The trick was to chain the subtree split into a forced push:

git push origin `git subtree split --prefix dist master`:production --force

I got this from the Addendum of http://clontz.org/blog/2014/05/08/git-subtree-push-for-deployment/, who actually references this answer on Stack Overflow. I had skimmed this one earlier but Steve Clontz’s post made it click for me.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)