How to reset a branch to another branch with git?
git
Solution
You mean you want to push your local `master` to the remote `hotfixes` branch? Like this:
git push origin +master:hotfixes
However, this requires that you are allowed to re-write the history on the remote side.
Problem
let's say that we have an `hotfixes` branch which was created from `master`. we added commits to `hotfixes`, but those commits were not useful, so now we want to start from a fresh copy of `master` again. to clarify better, this is the reference workflow: http://nvie.com/posts/a-successful-git-branching-model/ let's also say that we pushed `hotfixes` to the `origin` remote because we have an awful set up and that's the only way to test something, so we need to reset the branch also on the remote server. how to reset `hotfixes` to a copy of `master`?