How can I reset a project to a commit which is already pushend onto the remote Server?
If I do a usual reset, source tree wont push it onto the server because the server has a "newer" version?
How can I solve this problem? Is it even possible to overrite a branch?
If (and ONLY if) you are the only person who uses this repository, you can do a "force push" by opening the git command prompt by clicking on the Terminal icon, and then typing git push -f
.
However, if other people use the repository, you really, really don't want to do that, as they may have already pulled the commits you are trying to "undo" with your reset, and doing a force push will just screw up the history. In this case, the best way to undo those commits (or at least undo the effects of those commits) is to simply git revert
them.